Symbioose
claude-account-switcher
Python

Switch between multiple Claude Code and Codex CLI accounts from your Mac menu bar. View live usage and rate limits, auto-switch at limits, skip browser logins, and keep your flow.

Last updated Jul 1, 2026
40
Stars
2
Forks
5
Issues
0
Stars/day
Attention Score
37
Language breakdown
Python 99.3%
Shell 0.7%
โ–ธ Files click to expand
README

Claude/Codex Account Switcher

Downloads Latest release macOS Homebrew

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.

Claude Switcher screenshot

Why use it?

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.

Features

  • Claude Code account switching - swap saved Claude Code sessions instantly
  • Codex CLI account switching - save and restore Codex auth.json sessions
  • 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 .app build - no Python install required for normal users

Install

Homebrew

brew install --cask Symbioose/tap/claude-switcher

Then launch Claude Switcher from Spotlight or /Applications.

GitHub release

  • 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.

Usage

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 login flow
  • 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 status

After switching Codex, verify with:

codex login status

How it works

Claude 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 cliauthcredentials_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.

Architecture

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 setup note

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
cliauthcredentials_store = "file"

Then run:

codex login

If 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.

Security

  • Saved account backups are stored in macOS Keychain
  • The app config stores metadata only and is written with 0600 permissions
  • The config directory is written with 0700 permissions
  • 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

Requirements

  • 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

Build from source

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-switcher

Build the standalone app:

bash build_app.sh

Output: dist/Claude Switcher.app

Run tests:

pytest tests/ -q

Release artifact

The Homebrew cask expects release assets named:

Claude-Switcher-vX.Y.Z.zip

The app bundle inside the zip must be:

Claude Switcher.app

License

MIT

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท Symbioose/claude-account-switcher ยท Updated daily from GitHub