Home
Relevant source files
The following files were used as context for generating this wiki page:The cursor-free-vip project is a command-line utility designed for educational purposes to manage and reset the Cursor IDE's configuration. It provides a suite of tools for resetting machine-specific identifiers, managing user accounts, disabling auto-updates, and bypassing certain application limits. The tool is cross-platform, with support for Windows, macOS, and Linux, and includes multi-language capabilities.
The project is structured as a main script (main.py) that acts as a menu-driven entry point, calling various modules to perform specific tasks. Configuration is managed centrally via a config.ini file, and installation is streamlined through platform-specific scripts. The project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International license, emphasizing its use for non-commercial and educational purposes without modification.
Sources: README.md, LICENSE.md, main.py
Features
The application provides a range of functionalities accessible through a command-line menu.
| Feature | Description | Relevant Files |
|---|---|---|
| Machine ID Reset | Resets machine-specific identifiers in Cursor's configuration files to bypass trial detection. This includes storage.json, state.vscdb, and system-level identifiers. | totally_reset_cursor.py, reset_machine_manual.py |
| Account Management | Provides tools to register new Cursor accounts via manual email entry, Google OAuth, or GitHub OAuth. It also includes functionality to delete accounts. | main.py, locales/en.json:11,14-17 |
| Disable Auto-Update | Modifies Cursor's files to prevent the application from automatically updating. | main.py:352 |
| Bypass Token Limit | Patches the workbench.desktop.main.js file to remove the token limit for AI features. | bypass_token_limit.py |
| Bypass Version Check | Modifies product.json to bypass version restrictions imposed by the application. | main.py:364 |
| Configuration Management | Manages all settings through a central config.ini file, with defaults for different operating systems. | config.py |
| Multi-language Support | The user interface supports multiple languages, detected automatically or set manually. Translations are stored in JSON files. | main.py:82-243, locales/ |
Sources: main.py:328-388, locales/en.json:4-40, totally_reset_cursor.py, bypass_token_limit.py, config.py
Installation
The project provides automated installation scripts for Windows and Unix-like systems (Linux, macOS). These scripts fetch the latest release from the GitHub repository, download the correct binary for the user's OS and architecture, and execute it.
The installation flow is as follows:
- The user runs the installation command.
- The script contacts the GitHub API to find the latest release version and assets.
- It determines the user's operating system and architecture.
- It constructs the download URL for the appropriate release binary.
- The binary is downloaded to the user's
Downloadsfolder. - The script makes the binary executable and runs it.
This diagram illustrates the installation process handled by the install.sh and install.ps1 scripts.
Sources: scripts/install.sh, scripts/install.ps1, README.md:80-90
Application Architecture
The application is a modular Python-based command-line tool.
main.py: The main entry point. It initializes the configuration, checks for updates, displays the main menu, and dispatches tasks to other modules based on user input.TranslatorClass: A component withinmain.pyresponsible for internationalization (i18n). It detects the system language and loads the corresponding translation strings from JSON files located in thelocales/directory.- Feature Modules: Each primary feature is encapsulated in its own Python script (e.g.,
totally_reset_cursor.py,bypass_token_limit.py). These modules are imported and executed bymain.py. config.py: Handles the creation, reading, and updating of theconfig.inifile. It provides default paths and settings for different operating systems.logo.py: Responsible for rendering the ASCII art logo and other introductory text to the console.
This diagram shows the high-level interaction between the main components of the application.
Sources: main.py, config.py, logo.py, locales/en.json
Core Functionality: Reset Process
The "Totally Reset" and "Reset Machine ID" features are central to this tool. They are designed to erase Cursor's trial-related data by modifying configuration files and system identifiers. The process is primarily handled by the MachineIDResetter class in totally_reset_cursor.py and reset_machine_manual.py.
The reset process follows these steps:
- Locate Paths: The script first identifies the paths to Cursor's configuration files (
storage.json,state.vscdb) based on the operating system. - Generate New IDs: It generates new, unique identifiers (
devDeviceId,machineId,macMachineId,sqmId) usinguuidandhashlib. - Update JSON Storage: The new IDs are written into
storage.json. A backup of the original file is created. - Update SQLite DB: The new IDs are inserted or replaced in the
ItemTableof thestate.vscdbSQLite database. - Update System IDs (OS-dependent):
- Windows: It attempts to modify the
MachineGuidandMachineIdin the Windows Registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CryptographyandHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient). This requires administrator privileges. - macOS: It attempts to update the platform UUID in
/var/root/Library/Preferences/SystemConfiguration/com.apple.platform.uuid.plistusingsudo.
- Windows: It attempts to modify the
- Patch Application Files: The script modifies
workbench.desktop.main.jsto change UI elements (e.g., "Upgrade to Pro" button) andmain.jsto patch thegetMachineIdfunction, preventing the original ID from being retrieved.
This flowchart visualizes the machine ID reset sequence.
Configuration Management
The application's behavior is controlled by a configuration file, config.ini, which is managed by the config.py script.
Configuration File Location
The script creates a .cursor-free-vip directory in the user's Documents folder to store config.ini. If this path is inaccessible, it falls back to a temporary directory.
- Path:
%USERPROFILE%\Documents\.cursor-free-vip\config.ini(Windows) or~/Documents/.cursor-free-vip/config.ini(macOS/Linux).
Sources: config.py:18-36
Configuration Setup
On the first run, the setup_config function generates a config.ini file with default values. It populates settings for browser paths, timing delays for automation, and OS-specific paths for Cursor's application and data files. If the config file already exists, the function checks for and adds any missing default options to ensure compatibility with new versions.
Sources: config.py:42-205
Key Configuration Sections
The config.ini file is organized into several sections:
| Section | Description | Example Keys |
|---|---|---|
[Browser] | Paths to various web browsers and their corresponding WebDriver executables. | default_browser, chrome_path, chrome_driver_path |
[Timing] | Defines wait times and timeouts for browser automation tasks, such as form filling and page loads. | page_load_wait, input_wait, max_timeout |
[Utils] | General utility flags, such as enabling or disabling the automatic update check. | enabled_update_check, enabled_account_info |
[OAuth] | Settings related to OAuth authentication flows. | timeout, max_attempts |
[WindowsPaths] | OS-specific paths for Windows. | storage_path, cursor_path, product_json_path |
[MacPaths] | OS-specific paths for macOS. | storage_path, cursor_path, product_json_path |
[LinuxPaths] | OS-specific paths for Linux. | storage_path, cursor_path, product_json_path |
[Language] | Configuration for internationalization. | current_language, fallback_language |
Sources: config.py:45-199
Licensing
The cursor-free-vip project is distributed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License (CC BY-NC-ND 4.0).
This license means:
- Attribution (BY): You must give appropriate credit if you share the software.
- NonCommercial (NC): You may not use the material for commercial purposes.
- NoDerivatives (ND): If you remix, transform, or build upon the material, you may not distribute the modified material.
The primary intent is for the software to be used for educational and research purposes.
Sources: LICENSE.md