claude-switch (csw) Cheatsheet
Switch between multiple Claude Code and Desktop accounts on macOS, with credentials stored securely in the system Keychain.
Switch between multiple Claude Code and Desktop accounts on macOS, with credentials stored securely in the system Keychain.
claude-switch (csw) is a macOS CLI tool for managing multiple Claude accounts — both Claude Code and Claude Desktop — with a single command. It stores all credentials in the macOS Keychain (the same store Claude itself uses), so no tokens ever sit as plaintext on disk.
If you juggle a work and personal Claude account, this is the tool for you.
Installation and setup: see github.com/mtxr/claude-switch.
| Concept | What it means |
|---|---|
| Profile | A named snapshot of ~/.claude.json + ~/.claude/ for one account |
| Symlink swap | csw switches accounts by pointing the symlinks, not copying data |
| Keychain | macOS hardware-backed store — tokens are never written to plaintext files |
| Active profile | The account ~/.claude.json currently points to |
# Save the currently active session as a named profile
csw save <name>
# List all saved profiles
csw list
# Delete a profile permanently
csw delete <name>
# Show current session info
csw whoami
# Log out of every profile at once
csw logout-all
# Switch directly to a named profile
csw switch <name>
# Open interactive fuzzy-finder to pick a profile (requires sk or fzf)
csw pick
# 1. Save whatever account is active right now
csw save personal
# 2. Switch to an empty slot (logs you out of the current session)
csw switch work
# 3. Log into your second Claude account
claude login
# 4. Save it
csw save work
After this, switching is instantaneous — csw only swaps symlinks.
csw switch work # morning
csw switch personal # evening
Claude Desktop restarts automatically on each switch.
csw pick
# → fuzzy-browse your profiles with sk or fzf, Enter to switch
csw whoami
Don’t touch ~/.claude.json by hand. csw manages it as a symlink. Manual edits will break switching.
csw pick needs sk or fzf. csw switch <name> always works without them.
Keychain must be unlocked. On a freshly booted machine, open any Keychain-backed app first (Safari, 1Password) if switching fails.
Claude Desktop restarts on switch. This is intentional. Close open conversations before switching if you don’t want them interrupted.
Source: zero2hero.run/cheatsheets/claude-switch-cheatsheet — Zero to Hero cheatsheets for developers.