talira

cc-account-switcher

Account Switcher for Claude Code

open sourceMITself-hostablefree

cc-account-switcher (ccs) is a Bash script that saves several Claude Code logins and switches between them, keeping themes, settings and history. Its rate-limit auto-switch installs a PreToolUse hook that checks the 5-hour usage before each tool call and switches to the next account past a threshold (default 80%), then tells you the claude --resume command to continue; ccs run retries a headless claude -p run on the next account after a 429. It also maps directories to accounts, adds custom endpoints (OpenRouter, gateways) as accounts, runs accounts in parallel through CLAUDE_CONFIG_DIR on Linux and WSL, and stores credentials in the macOS Keychain or protected files. It's a fork of ming86/cc-account-switcher, which is archived.

Problems it solves

  • a small shell script to save and swap my Claude Code logins
  • switch Claude Code to my work account automatically when I cd into my work directory
  • move to the next Claude account when 5-hour usage passes a threshold, without a background process
  • retry a headless claude -p run on another account when it fails with a 429
  • run orchestrator agents on different Claude accounts at the same time on Linux
  • add OpenRouter or a company gateway as another switchable Claude Code account
  • carry the current Claude conversation across an account switch
  • a status line showing which Claude account is active and its 5-hour usage
  • preview what a Claude account switch will change before doing it
  • name my Claude accounts work and personal and switch by name
  • roll back automatically if a Claude account switch fails halfway

Features

  • add, remove, list and rotate accounts; switch by number, email or profile name
  • rate-limit auto-switch through a PreToolUse hook (default 80% of the 5-hour window)
  • ccs run: retry a failed command on the next account after a rate limit
  • directory-based switching
  • custom endpoints as switchable accounts
  • --resume handoff, forking or keeping the session id
  • parallel isolation with CLAUDE_CONFIG_DIR (ccs exec, Linux and WSL)
  • optional status line with the active account and 5-hour usage
  • dry-run mode and automatic rollback
  • health checks, status and per-account usage statistics
View 1 more
  • credentials in the macOS Keychain or protected files

Limitations

  • Doesn't run different accounts in parallel on macOS: Claude Code rejects a copied token in an isolated config dir1
  • Doesn't support native Windows: it works on macOS, Linux and WSL1

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what cc-account-switcher does.

  1. claude-swap Multi-account switcher for Claude Code
  2. Claude account rotator Claude Code mod: rotates between your Claude logins as their usage limits fill
  3. clauth Claude Code multi-account manager, usage monitor (CLI, TUI & cross-account delegation via MCP)
  4. cux Run multiple Claude Code accounts as one
  5. Claude account rotator (Nathan Broadbent's fork) The account rotator with one coordinator for every session, a menu bar app and weekly-limit rotation
  6. claude-multi-desktop Run multiple Claude Desktop accounts at the same time on a Mac

Compare cc-account-switcher with the top 3