Switch between multiple Claude Code and Codex CLI accounts from your macOS menu bar.
Claude Switcher keeps separate account sessions for Claude Code and Codex CLI, shows live usage, and can automatically switch to another saved account when a provider reaches its limit.
AI coding CLIs are great until you need to jump between personal, work, team, or backup accounts. Without this app, switching usually means logging out, opening a browser, logging back in, and interrupting whatever you were doing in the terminal.
Claude Switcher stores account backups in macOS Keychain and swaps the active CLI session in one click. Claude and Codex are handled independently, so the active Claude account never changes your active Codex account.
- Claude Code account switching - swap saved Claude Code sessions instantly
- Codex CLI account switching - save and restore Codex
auth.jsonsessions - Provider-separated state - same email can exist once for Claude and once for Codex
- Live usage in the menu bar - Claude 5-hour/7-day windows and Codex primary/secondary windows
- Optional auto-switch - per-provider failover when active usage reaches 100%
- First-launch import - imports the currently logged-in Claude and Codex accounts when available
- macOS Keychain backups - saved credentials are stored in Keychain, not plaintext config
- Standalone
.appbuild - no Python install required for normal users
brew install --cask Symbioose/tap/claude-switcherThen launch Claude Switcher from Spotlight or /Applications.
- Open the latest release
- Download
Claude-Switcher-vX.Y.Z.zip - Unzip it and drag Claude Switcher.app to
/Applications - Launch it. The app appears as a menu bar icon.
On first launch, macOS may block the app because it is not signed. Open System Settings -> Privacy & Security and click Open Anyway.
Open the menu bar icon to:
- click any Claude or Codex account to make it active
- add a Claude account with
claude auth login - add a Codex account with a visible Terminal-based
codex loginflow - refresh live usage manually
- enable or disable auto-switch separately for Claude and Codex
- remove saved inactive accounts from Keychain
After switching Claude, verify from any terminal:
claude auth statusAfter switching Codex, verify with:
codex login statusClaude Code stores OAuth credentials in macOS Keychain under Claude Code-credentials and account metadata in ~/.claude.json. Claude Switcher backs up each saved Claude account under claude-switcher:{email}, then restores the selected backup into Claude Code's active credential slot and updates ~/.claude.json.
Codex CLI stores ChatGPT authentication in ~/.codex/auth.json when cli_auth_credentials_store = "file" is used. Claude Switcher backs up each saved Codex session under codex-switcher:{email} and restores the selected session back to ~/.codex/auth.json with 0600 permissions.
Auto-switch is disabled by default. When enabled, usage refreshes in the background and the app switches only within the same provider. A full Claude account switches to another Claude account; a full Codex account switches to another Codex account.
macOS Keychain
├── Claude Code-credentials active Claude token
├── claude-switcher:user1@... saved Claude account
├── claude-switcher:user2@... saved Claude account
├── codex-switcher:user1@... saved Codex auth.json
└── codex-switcher:user2@... saved Codex auth.json
~/.claude.json
└── oauthAccount swapped on Claude account switch
~/.codex/auth.json
└── tokens swapped on Codex account switch
~/.config/claude-switcher/accounts.json
└── provider, email, plan, active state, settings
Codex keyring storage is detected but not switched in this release. When adding a Codex account, the app opens Terminal and runs Codex login with file-mode credentials. You can also configure file mode explicitly:
# ~/.codex/config.toml
cli_auth_credentials_store = "file"Then run:
codex loginIf a saved Codex session expires because its refresh token was already rotated, the app refuses to restore that stale session and shows Login required for usage. Add that Codex account again to refresh the saved Keychain backup.
- Saved account backups are stored in macOS Keychain
- The app config stores metadata only and is written with
0600permissions - The config directory is written with
0700permissions - Email validation prevents Keychain service-name injection
- Subprocess calls do not use
shell=True - Network usage checks run with short timeouts in background workers
- Keychain reads/writes use short timeouts so the menu bar UI does not hang indefinitely
- macOS 12 or later
- Claude Code CLI for Claude account switching
- Codex CLI for Codex account switching
- Codex file-mode credentials for Codex switching in this version
git clone https://github.com/Symbioose/claude-account-switcher.git
cd claude-account-switcher
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Run directly:
claude-switcherBuild the standalone app:
bash build_app.sh
# Output: dist/Claude Switcher.appRun tests:
pytest tests/ -qThe Homebrew cask expects release assets named:
Claude-Switcher-vX.Y.Z.zip
The app bundle inside the zip must be:
Claude Switcher.app
MIT
