Account Management
Relevant source files
The following files were used as context for generating this wiki page:
The Account Management system within the cursor-free-vip project is a suite of Python scripts designed to programmatically create, inspect, delete, and reset Cursor user accounts. The primary goal of these scripts is to manage the account lifecycle to bypass trial limitations and usage caps imposed by the Cursor application.
This system operates by interacting with both local Cursor application data (configuration files, SQLite databases) and remote Cursor API endpoints. It heavily relies on browser automation via the DrissionPage library to simulate human interactions for processes like registration and deletion, which are protected by security measures such as Turnstile CAPTCHA. The core functionalities include retrieving account usage statistics, registering new accounts, deleting existing ones, and resetting machine-specific identifiers to start fresh trial periods.
Account Information Retrieval
The system provides functionality to retrieve and display comprehensive information about the currently logged-in Cursor account, including email, subscription status, and usage statistics for different AI models.
Sources: cursor_acc_info.py
Data Sources and Flow
Account information is aggregated from multiple sources: local application files and remote API endpoints. The process prioritizes local data for speed and falls back to API calls for real-time information.
The following diagram illustrates the data retrieval flow:
Sources: cursor_acc_info.py:255-393
Key Components
Token and Email Retrieval
Authentication tokens and user emails are extracted from local Cursor application files. The system searches in a specific order across different files and formats.
Search Locations for Token/Email:
storage.json: A JSON file in the user's application data directory. The script looks for keys likecursorAuth/accessTokenandcursorAuth/cachedEmail.state.vscdb: An SQLite database where information is stored in anItemTable. The script queries for rows with keys containing 'token' or 'email'.- Session Storage: Log files within the
Session Storagedirectory are scanned for token patterns using regular expressions.
Sources: cursor_acc_info.py:145-228, cursor_acc_info.py:314-347
API Interaction (UsageManager)
The UsageManager class is responsible for fetching live data from Cursor's APIs.
Sources: cursor_acc_info.py:44-110
The key API endpoints are summarized below:
| Endpoint | Method | Purpose | Authentication | Source File |
|---|---|---|---|---|
https://www.cursor.com/api/usage | GET | Fetches usage data for GPT-4 and GPT-3.5 models. | Cookie (WorkosCursorSessionToken) | cursor_acc_info.py:65-95 |
https://api2.cursor.sh/auth/full_stripe_profile | GET | Retrieves detailed subscription and profile information from Stripe. | Bearer Token (Authorization) | cursor_acc_info.py:97-110 |
Displayed Information
The display_account_info function formats and presents the collected data in a structured table in the console, showing:
- Email Address: The user's email.
- Subscription: The current plan (e.g., Pro, Free Trial).
- Trial Remaining: Days left on a Pro trial, if applicable.
- Usage Statistics: Request counts for "Fast Response" (GPT-4) and "Slow Response" (GPT-3.5) models, including usage percentages.
Sources: cursor_acc_info.py:350-466
Account Creation
New Cursor accounts can be created programmatically using browser automation. The new_signup.py script automates visiting the sign-up page, filling in user details, and handling security verifications.
Sources: new_signup.py
Registration Flow
The process involves several steps, from setting up the browser to handling multiple verification stages.
Sources: new_signup.py:431-507
Key Functions
setup_driver(): Initializes aChromiumPageinstance, configures it to use a specific browser executable, and loads a browser extension (turnstilePatch) to help bypass CAPTCHA.fill_signup_form(): Locates and fills the input fields for first name, last name, and email on the registration page.handle_turnstile(): A crucial function that attempts to solve the Cloudflare Turnstile challenge, which may involve clicking checkboxes within an iframe.fill_password(): Enters the desired password after the initial form submission.handle_verification_code(): Retrieves a verification code (either manually or from an automated email reader) and inputs it into the verification code form.
Sources: new_signup.py:133-214, new_signup.py:53-84, new_signup.py:216-288, new_signup.py:314-342, new_signup.py:344-429
Account Deletion
The system provides a script to automate the deletion of a Cursor account linked with Google OAuth. This process uses browser automation to navigate through the Cursor web interface to the account deletion section.
Sources: delete_cursor_google.py
Deletion Process Sequence
The deletion process involves logging in via Google, navigating to the settings page, and confirming the deletion.
Sources: delete_cursor_google.py:21-346
Key Steps
- Login: The script navigates to the Cursor sign-up page and clicks the "GoogleOAuth" link to initiate login. The user is expected to complete the Google authentication manually in the browser window.
- Navigate to Settings: After successful login, the script navigates to the account settings page (
https://www.cursor.com/settings). It includes logic to handle different post-login redirect URLs. - Access Advanced Tab: It clicks the "Advanced" tab or navigates directly to
?tab=advancedto reveal the deletion option. - Initiate Deletion: The script finds and clicks the "Delete Account" button.
- Confirm Deletion: In the confirmation modal, it programmatically types "Delete" into the input field and clicks the final "DELETE" button to permanently remove the account.
Sources: delete_cursor_google.py:33-120, delete_cursor_google.py:148-212, delete_cursor_google.py:214-325
Machine ID and State Reset
A core feature of the project is the ability to reset the local state of the Cursor application to bypass trial and usage limits. This involves deleting or modifying local files and registry keys that store machine-specific identifiers.
Sources: totally_reset_cursor.py, reset_machine_manual.py
Reset Process
The MachineIDResetter class in totally_reset_cursor.py orchestrates the reset process.
Sources: totally_reset_cursor.py:655-731
Components of the Reset
1. ID Generation
New unique identifiers are generated to replace the old ones.
telemetry.devDeviceId: A new UUIDv4.telemetry.machineId: A SHA256 hash of random bytes.telemetry.macMachineId: A SHA512 hash of random bytes.telemetry.sqmId: A new UUIDv4 in uppercase format.
Sources: totally_reset_cursor.py:590-609
2. Local File Modification
The script targets several files in the Cursor application data directory to replace the old IDs with the newly generated ones.
| File/Database | Path (Windows Example) | Modification |
|---|---|---|
storage.json | %APPDATA%\Cursor\User\globalStorage\storage.json | Updates keys like telemetry.machineId with new values. |
state.vscdb | %APPDATA%\Cursor\User\globalStorage\state.vscdb | Inserts or replaces rows in ItemTable for the new IDs. |
machineId | %APPDATA%\Cursor\machineId | Overwrites the file content with the new devDeviceId. |
Sources: totally_reset_cursor.py:527-588, totally_reset_cursor.py:611-640, totally_reset_cursor.py:733-762
3. System-Level ID Modification
For a more thorough reset, the script attempts to modify system-level identifiers stored in the OS registry (Windows) or system preference files (macOS). This action typically requires administrative privileges.
- Windows: Updates
MachineGuidunderHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CryptographyandMachineIdunderHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient. - macOS: Updates the
com.apple.platform.uuid.plistfile.
Sources: totally_reset_cursor.py:657-731
4. JavaScript Patching
The reset process also involves patching JavaScript files within the Cursor application bundle to alter its behavior, such as removing the "Upgrade to Pro" button or bypassing token limits.
workbench.desktop.main.js: Modified to change UI elements and bypass token limits.main.js: Patched to alter thegetMachineIdfunction, likely to prevent it from retrieving the original hardware ID.
Sources: totally_reset_cursor.py:341-424, reset_machine_manual.py:302-441
Configuration
Account management scripts are configured via config.ini. This file defines paths to browser executables, application data directories for different operating systems, and timing delays for browser automation to mimic human behavior.
| Section | Key | Description | Default Value |
|---|---|---|---|
Browser | default_browser | The browser to use for automation. | chrome |
Browser | chrome_path | Path to the Chrome executable. | Platform-specific default |
WindowsPaths | storage_path | Path to storage.json on Windows. | %APPDATA%\Cursor\User\globalStorage\storage.json |
MacPaths | storage_path | Path to storage.json on macOS. | ~/Library/Application Support/Cursor/User/globalStorage/storage.json |
LinuxPaths | storage_path | Path to storage.json on Linux. | ~/.config/cursor/User/globalStorage/storage.json |
Timing | input_wait | Wait time range after typing in a field. | 0.3-0.8 |
OAuth | timeout | Timeout in seconds for OAuth authentication. | 120 |
Sources: config.py:27-106