A high-performance, cross-platform desktop application for managing and switching between multiple Cursor AI accounts. Built with Tauri, Rust, and React.
- Current Account Info: Real-time display of logged-in account information
- Usage Statistics: Live quota tracking with visual progress bars
- Quick Actions: One-click machine ID reset
- Account List: View all accounts with status indicators
- Batch Import: Import multiple accounts with intelligent auto-detection
- β¨ Auto-detects email and tokens from various formats
- Supports CSV, JSON, Chinese brackets (γγ), labeled text, and more
- Automatically extracts email, accessToken, and optional sessionToken
- Online Update: Update all account information from Cursor API
- Smart Switching: Switch accounts with automatic machine ID reset
- Delete Accounts: Remove unwanted accounts
- Auto-detect Cursor Path: Automatically finds Cursor installation
- Machine ID Management: Reset system identifiers
- Process Control: Kill/restart Cursor application
- Activity Tracking: View all application operations
- Export Logs: Save logs for debugging
- Persistent Storage: Account data stored in user directory
- Survives Updates: Data persists across app updates
- Cross-platform: Follows OS best practices
- Activity Logs: All operations logged for debugging
- Storage Locations:
- macOS:
~/Library/Application Support/com.cursor.switcher/cursor_auth_total.csv- Account dataapp.log- Application logs
- Windows:
C:\Users\<USERNAME>\AppData\Roaming\com.cursor.switcher\cursor_auth_total.csv- Account dataapp.log- Application logs
- Linux:
~/.config/com.cursor.switcher/cursor_auth_total.csv- Account dataapp.log- Application logs
- macOS:
Compared to the original Python version:
| Feature | Python + PyQt5 | Tauri (This Version) |
|---|---|---|
| Bundle Size | ~50-80 MB | ~10-15 MB β |
| Startup Time | ~1-2s | <500ms β |
| Memory Usage | ~50-100 MB | ~30-50 MB β |
| UI Performance | Good | Excellent β |
| Modern UI | Limited | React + Tailwind β |
| Cross-platform | β | β |
- Node.js (v18+): Download
- Rust (latest stable): Install
- System Dependencies:
- Windows: Visual Studio C++ Build Tools
- macOS: Xcode Command Line Tools
- Linux:
libwebkit2gtk-4.1-dev,libjavascriptcoregtk-4.1-dev,libappindicator3-dev,librsvg2-dev,patchelf,libsoup-3.0-dev,build-essential,curl,wget,libssl-dev,libgtk-3-dev
# 1. Clone or navigate to the project
cd cursor-account-switcher
# 2. Install dependencies
npm install
# 3. Run in development mode
npm run tauri dev
# 4. Build for production
npm run tauri buildcursor-account-switcher/
βββ src/ # React frontend
β βββ pages/ # Page components
β β βββ HomePage.tsx
β β βββ AccountPage.tsx
β β βββ SettingsPage.tsx
β β βββ LogPage.tsx
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
β βββ test/ # Test utilities
β βββ __tests__/ # Component tests
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ version.ts # Version management
β βββ styles.css # Tailwind styles
βββ src-tauri/ # Rust backend
β βββ src/
β β βββ main.rs # Tauri commands
β β βββ database.rs # SQLite operations
β β βββ csv_manager.rs # CSV file handling
β β βββ api_client.rs # Cursor API client
β β βββ machine_id.rs # ID generation
β β βββ process_utils.rs # Process management
β β βββ path_detector.rs # Path detection
β β βββ reset_machine.rs # Machine ID reset
β β βββ logger.rs # Logging system
β β βββ types.rs # Rust types
β βββ tests/ # Backend tests
β βββ Cargo.toml # Rust dependencies
β βββ tauri.conf.json # Tauri configuration
βββ scripts/ # Build & utility scripts
βββ .github/workflows/ # CI/CD workflows
βββ package.json # Node dependencies
βββ vitest.config.ts # Vitest configuration
βββ CONTRIBUTING.md # Contribution guidelines
βββ README.md
# Development
npm run dev # Run Vite dev server
npm run tauri dev # Run Tauri app in dev mode
# Build
npm run build # Build frontend
npm run tauri build # Build complete app
npm run preview # Preview production build
# Testing
npm test # Run all tests (frontend + backend)
npm run test:frontend # Run frontend tests
npm run test:frontend:watch # Run frontend tests in watch mode
npm run test:frontend:ui # Run frontend tests with UI
npm run test:frontend:coverage # Run tests with coverage
npm run test:backend # Run backend tests
npm run test:backend:verbose # Run backend tests with verbose output
# Linting & Formatting
npm run lint # Lint all code (TypeScript + Rust)
npm run lint:ts # Lint TypeScript only
npm run lint:rust # Lint Rust only
npm run format # Format all code
npm run format:ts # Format TypeScript only
npm run format:rust # Format Rust only
npm run format:check # Check formatting without modifying
# Version Management
npm run sync-version # Sync version across package.json and tauri.conf.json
npm run release # Create a new releaseThis project includes comprehensive test coverage for both frontend and backend.
# Run all tests
npm test
# Run frontend tests only
npm run test:frontend
# Run backend tests only
npm run test:backend
# Run frontend tests in watch mode
npm run test:frontend:watch
# Run tests with coverage
npm run test:frontend:coverage
# Run backend tests with verbose output
npm run test:backend:verbose- β
Frontend: Component tests using Vitest and React Testing Library
- Page components (HomePage, AccountPage, SettingsPage)
- Type definitions
- Utilities and helpers
- β
Backend: Unit tests and integration tests using Rust's built-in test framework
- All Rust modules tested
- Cross-module integration tests
- β CI/CD: Automated testing on all platforms via GitHub Actions
Format (one per line):
email,accessToken,sessionToken
Example:
user@example.com,eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...,WorkosCursorSessionToken=user_xxx%3A%3A...
user2@example.com,eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Note: SessionToken (cookie) is optional. If you only have email and accessToken, you can omit the third field.
- Go to Accounts page
- Click the switch icon (β») next to an account
- Confirm the switch
- Cursor will close automatically
- Restart Cursor to use the new account
Method 1: Settings page β "Reset Machine ID" button
Method 2: Home page β "Reset Machine ID" quick action
Note: On Windows, administrator privileges may be required
npm run tauri buildOutput: src-tauri/target/release/bundle/msi/
npm run tauri buildOutput: src-tauri/target/release/bundle/dmg/
npm run tauri buildOutput: src-tauri/target/release/bundle/deb/ or appimage/
This project includes automated workflows for building, testing, and releasing across all platforms.
The release workflow automatically builds for Windows, macOS, and Linux.
Trigger a release:
-
Via Git Tag (Recommended):
# Update version across all files npm run sync-version # Create and push version tag git tag v2.0.0 git push origin v2.0.0
-
Via Manual Dispatch:
- Go to Actions tab on GitHub
- Select "Release" workflow
- Click "Run workflow"
- Enter version (e.g.,
2.0.0)
What happens:
- Builds for all platforms in parallel (Linux, macOS, Windows)
- Creates installers (
.msi,.exe,.dmg,.deb,.AppImage) - Creates a GitHub release with all artifacts
- Automatically generates release notes
Runs on every push and pull request to main and develop branches:
- TypeScript linting and formatting checks
- Rust linting and formatting checks
- Frontend build validation
- Full Tauri build on all platforms (Ubuntu, macOS, Windows)
Automated testing on push and pull requests:
- Frontend Tests: Run Vitest tests with coverage reporting
- Backend Tests: Run Cargo tests on all platforms
- Linting: Check code formatting and style
- Coverage: Upload coverage reports to Codecov
.github/workflows/release.yml- Automated release builds.github/workflows/ci.yml- Continuous integration checks.github/workflows/test.yml- Automated testing and coverage
- Local Data: All account data stored locally in CSV files and SQLite database
- No Telemetry: No data sent to external servers (except Cursor API for account updates)
- Sandboxed: Tauri's security model with restricted file system access
- Open Source: Fully auditable code
- Logging: Activity logs stored locally for debugging purposes
Problem: When downloading the .dmg file from GitHub releases, macOS displays an error: "Cursor Account Switcher is damaged and can't be opened. You should move it to the Trash."
Cause: This app is not signed with an Apple Developer certificate (which costs $99/year). macOS Gatekeeper blocks unsigned apps downloaded from the internet.
Solution: Remove the quarantine attribute that macOS adds to downloaded files.
-
Open Terminal (Applications β Utilities β Terminal)
-
Run the following command:
sudo xattr -r -d com.apple.quarantine "/Applications/Cursor Account Switcher.app"Note: Adjust the path if you installed the app elsewhere. You'll be prompted for your password.
-
Launch the app normally - it should now open without issues.
What this does: Removes the "quarantine" flag that macOS adds to downloaded files, while preserving other file metadata.
- Locate the app in Finder (after moving it from the DMG to Applications)
- Right-click (or Control-click) on the app
- Select "Open" from the context menu
- Click "Open" again in the security dialog
- The app will now run and be trusted for future launches
- Try to open the app normally (it will fail)
- Go to System Settings β Privacy & Security
- Scroll down to the Security section
- You'll see a message about the blocked app
- Click "Open Anyway"
- Confirm by clicking "Open"
Important: These methods are safe for this open-source app. Always verify the source of any software before bypassing security checks.
Manually set the path in Settings:
- Windows:
%APPDATA%\Cursor\User\globalStorage - macOS:
~/Library/Application Support/Cursor/User/globalStorage - Linux:
~/.config/Cursor/User/globalStorage
Run the application as Administrator:
# Right-click the .exe β "Run as administrator"# Clean and rebuild
rm -rf node_modules src-tauri/target
npm install
npm run tauri buildThis application uses two storage mechanisms:
Stored at {app_data_dir}/cursor_auth_total.csv:
Index,Email,Access Token,Refresh Token,Cookie,Days Remaining,Status,Record Time
1,test@example.com,eyJhbGci...,eyJhbGci...,user_xxx%3A%3A...,28.5,pro,2025-10-22 15:30:00Cursor's own storage at {cursor_path}/state.vscdb:
- Stores authentication tokens
- Session information
- User preferences
The application reads from and writes to both storage locations to manage accounts.
Contributions are welcome! Please read our Contributing Guidelines for details on:
- Development setup
- Code standards
- Testing requirements
- Pull request process
- Commit message conventions
Feel free to submit a Pull Request or open an Issue!
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
This tool is for learning and research purposes only. Do not use it for purposes that violate Cursor's terms of service. Users are solely responsible for any consequences arising from use of this tool.
- Original Python version: Cursor Account Switcher Team
- Built with Tauri - Lightweight desktop framework
- UI powered by React + Tailwind CSS
- Icons from Lucide
- Testing with Vitest + React Testing Library
Version: 1.0.0
Update Date: 2025-10-23
Tech Stack: Tauri 1.5 + Rust + React 18 + TypeScript + Vite
Key Dependencies:
- Frontend: React, React Router, Lucide Icons, date-fns
- Backend: Rust, Tokio, Rusqlite, Reqwest, Serde
- Testing: Vitest, React Testing Library, Cargo Test
- Build: Vite, Tailwind CSS, TypeScript ESLint