Skip to content

ConvolutedDog/CursorSwitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cursor Switch

简体中文

A small desktop app (Tauri) to manage AI model settings used by Cursor—builtin models, composer model, and custom API providers—by reading and updating Cursor’s state.vscdb and a local config file.

Screenshots

Cursor Switch screenshot 1

Cursor Switch screenshot 2

Cursor Switch screenshot 3

Features

  • Current model: Shows the active composer model and related state when the DB is present
  • Builtin models: Enable or disable built-in Cursor models (with sensible guards around Auto / current model)
  • Custom providers: Add, edit, sync-to-DB, delete, and switch custom OpenAI-compatible providers
  • UI languages: English and Simplified Chinese

Requirements

  • Cursor installed (the app reads its user data)
  • macOS, Windows, or Linux (paths below match Cursor’s usual layout)
  • To build from source: Rust via rustup and the Tauri CLI (cargo install tauri-cli --locked)
  • macOS builds: Xcode Command Line Tools (xcode-select --install)
  • Windows (WebView2): A normal install has the WebView2 runtime; if you cross-compile with x86_64-pc-windows-gnu, ship WebView2Loader.dll next to the exe (the Windows build script can fetch it—see scripts/build-windows.sh)

Building

From the repository root:

macOS (.app + DMG)

chmod +x scripts/build-macos.sh   # once
./scripts/build-macos.sh

Defaults to aarch64-apple-darwin on Apple Silicon and x86_64-apple-darwin on Intel. Override if needed:

TARGET=x86_64-apple-darwin ./scripts/build-macos.sh

Artifacts: src-tauri/target/<triple>/release/bundle/ (DMG / .app) and src-tauri/target/<triple>/release/cursor-switch.

Windows

On Windows, or from CI (windows-latest):

chmod +x scripts/build-windows.sh   # once; on Windows use Git Bash or similar
./scripts/build-windows.sh

From macOS cross-compiling to Windows, prefer the GNU + MinGW path (see comments in scripts/build-windows.sh). One-time on macOS: brew install mingw-w64, then:

TARGET=x86_64-pc-windows-gnu ./scripts/build-windows.sh

The script adds the Rust target, sets CC_x86_64_pc_windows_gnu when x86_64-w64-mingw32-gcc is on PATH, and copies WebView2Loader.dll beside cursor-switch.exe for GNU builds. For a full NSIS installer, run the script on Windows (or set FORCE_WINDOWS_BUNDLE=1 where makensis is available).

Quick local debug (without bundling)

cd src-tauri
cargo tauri dev

Usage

  1. Quit Cursor before operations that write to its database (the app will warn you when Cursor is running).
  2. Open Cursor Switch (installed .app / .exe or cargo tauri dev).
  3. Use the window to inspect status, toggle builtins, manage providers, and switch models—then restart Cursor if the UI tells you to.

Configuration

App config

Per-user provider and related settings are stored in:

  • macOS / Linux: ~/.cursor-switch/config.json
  • Windows: %USERPROFILE%\.cursor-switch\config.json

The file uses snake_case keys (same as on disk in ~/.cursor-switch/config.json). Runtime-only provider fields (id, is_active, …) are not written back to JSON; only name, base_url, and api_key are persisted per provider.

Example:

{
  "preferred_lang": "en",
  "preferred_theme": "light",
  "users": [
    {
      "user_email": "you@example.com",
      "stripe_membership_type": "pro",
      "providers": [
        {
          "name": "my-openai-compatible",
          "base_url": "https://api.example.com/v1",
          "api_key": "sk-your-key"
        },
        {
          "name": "placeholder-model",
          "base_url": "",
          "api_key": ""
        }
      ]
    }
  ]
}

Cursor database (state.vscdb)

The app reads Cursor’s SQLite DB:

OS Default path
macOS ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
Windows %APPDATA%\Cursor\User\globalStorage\state.vscdb
Linux ~/.config/Cursor/User/globalStorage/state.vscdb

Override for tests or custom installs: set environment variable CURSOR_STATE_VSCDB to an absolute path.

Relevant table/key:

  • Table: ItemTable
  • Key (among others): src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.applicationUser

Supported membership types

Custom providers are intended for paid tiers (e.g. pro, pro_plus, ultra, enterprise). Free accounts are mainly limited to builtin model toggles—see the in-app messaging.

License

MIT License

About

A small desktop app (Tauri) to manage AI model settings used by Cursor—builtin models, composer model, and custom API providers.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors