Claude Code account switcher for Windows. A tray app that shows live usage (5-hour session + weekly limits) for all your Claude Code accounts at once, and switches the active account with one click, no re-login. Tokens are encrypted at rest with Windows DPAPI.
Unofficial. Claude Switch is not affiliated with, endorsed by, or sponsored by Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic, PBC. This tool only manages your own accounts' credential files, locally, on your own machine; it never proxies requests or handles credentials on anyone else's behalf. Note that usage polling and token refresh call the same undocumented OAuth endpoints Claude Code itself uses, and Anthropic's consumer terms restrict third-party use of OAuth credentials; use at your own risk.
- Tray icon shows the active account's 5-hour usage percent, colored green (< 60%), amber (60-85%), red (> 85%). Gray
--means no data yet. - Left-click the tray icon to open the flyout: one glass card per account with usage bars and reset countdowns.
- Click a card to switch Claude Code to that account. Takes effect for the next
claudesession you start; already-running sessions keep their login. - Right-click the tray icon for Refresh / autostart toggle / Quit.
- In a terminal:
claude /loginand log in with the account you want to add. - Open the flyout and click + Capture current account.
- Repeat for each account. Each account is captured once, ever.
Claude Code stores its login in ~/.claude/.credentials.json (OAuth tokens) and ~/.claude.json (oauthAccount identity block). Captured profiles are stored DPAPI-encrypted (tied to your Windows user) in %APPDATA%\claude-switch\profiles\. Switching writes the chosen profile back into those two files atomically; timestamped DPAPI-encrypted backups of both files are kept in %APPDATA%\claude-switch\backups\ (newest 20). Backups can only be decrypted by your Windows user on this machine (recovery: any small DPAPI unprotect script run as you).
- Usage polling is read-only, every 120 seconds, matching the conservative end of what established community tools (claude-monitor, CCSeva, usage-monitor-for-claude) do.
- Token refresh is only performed when a token is within 5 minutes of expiry, and the rotated refresh token is always persisted immediately: to the vault, and for the active account also back to
.credentials.jsonatomically. (A rotated-but-unpersisted refresh token is the one known way third-party tools have logged people out of Claude Code.) - Before every switch, the outgoing account's freshest tokens are re-captured into the vault.
- 429 responses trigger exponential backoff (4 to 15 minutes) honoring
Retry-After.
Requires Rust (MSVC), Node.js.
npm install
npm run tauri build # release exe + NSIS installer in src-tauri/target/release
npm run tauri dev # dev mode
- The usage endpoint (
api.anthropic.com/api/oauth/usage) is the same one Claude Code's/usageuses but it is not a documented public API; a server-side change can break the usage display (switching would keep working). - Switching does not affect claude.ai in the browser, only the Claude Code CLI.
- If Anthropic invalidates a refresh token (password change, security event), that account needs one
claude /loginagain, then re-capture. - No guarantee is made that using this tool is risk-free with respect to Anthropic's terms of service (see the disclaimer at the top). The design minimizes surface area (read-only polling at a conservative cadence, self-identifying user agent, no spoofing of the official client), but the risk call is yours.
Found a vulnerability? Please report it privately, see SECURITY.md. Do not open a public issue for security problems.
MIT, see LICENSE.
