Overview
CC Account Switcher manages several Claude Code accounts on one machine and switches between them without touching themes, settings or history. It started as a fork of ming86/cc-account-switcher; I now maintain it and wrote most of the current code.
What it does
- Add, remove and list accounts; switch by number, email or a named profile such as
workorpersonal - Map directories to accounts and switch automatically on
cd - Switch accounts automatically when a usage limit is hit, using a Claude Code hook
- Preview a switch with
--dry-run, and roll back automatically if a switch fails halfway - Store credentials in the macOS keychain, or in protected files on Linux and WSL
Engineering
- A single Bash 3.2+ script, so it runs on the stock macOS shell without extra dependencies
- 85 bats tests covering concurrency, isolation and platform differences, run in GitHub Actions
- Release pipeline that publishes to GitHub Releases, a Homebrew tap and npm
- Japanese localisation of the CLI and docs
Install
brew install fairy-pitta/tap/ccswitch
# or
npx @fairy-pitta/cc-account-switcher --help