claude-account-switcher (csw)
csw snapshots each native Claude Code login (refresh token + access token +
organization metadata) as a profile and swaps between them in one command.
What makes it solid
- Preserves native login state —
/statusreports the right Email and Organization per profile, not an opaque token. - Repairs session visibility — rebuilds
~/.claude.jsonprojects from raw transcripts so old conversations stay resumable after a switch. - Secure by construction —
umask 077, credentials at0600, dirs at0700, atomicmkdir-based file locking with stale-lock recovery. - Cross-platform — macOS, Linux, Windows. Zero npm deps beyond
zsh,python3,jq, and the realclaudeCLI.
npm install -g claude-cli-switcher
csw use work