2026
A CLI and TUI that swaps saved sign-in sessions for Cursor, Claude Code, Codex and VS Code / GitHub Copilot, so moving between a personal and a work account doesn't mean logging out and back in.
cursor-switch is a small Go command-line tool, with an interactive terminal
menu, that keeps saved sign-in sessions for several AI coding tools and swaps
between them. It started with Cursor and now covers four platforms:
| Platform | Where the session lives | Restarts the app |
|---|---|---|
| Cursor | state.vscdb |
yes |
| Claude Code | ~/.claude/.credentials.json and the Keychain |
no |
| Codex | ~/.codex/auth.json |
no |
| VS Code / GitHub Copilot | state.vscdb and the Keychain |
yes |
If you have a personal and a work subscription for the same tool, switching means signing out, signing in, and often a browser round-trip — every time. The session is just data on disk and in the Keychain, so the tool saves that data per account and puts it back.
cursorAuth/* keys in Cursor's SQLite
state database, the GitHub keys and Keychain item for VS Code, the
claudeAiOauth tokens and oauthAccount metadata for Claude Code, or
auth.json for Codex.For Claude Code, the Keychain write merges tokens into the existing item instead of replacing it, so MCP plugin authentication stored there survives.
cursor-switch # interactive menu
cursor-switch platform use claude # choose the default platform
cursor-switch save personal # save the current session
cursor-switch switch work # by id or label
cursor-switch --platform codex save work
Accounts default to personal and work; add more with labels. Each platform keeps its own account list.
0600 permissions
under ~/.cursor-account-switcher/, and should be kept private.Go, Cobra, Bubble Tea / Lip Gloss, and a pure-Go SQLite driver. Installs to
~/.local/bin with a one-line script or make install.