A single-binary CLI tool for managing multiple Claude Code accounts. No dependencies. No Go. No Node.js. No Python. Just download and run.
If you use Claude Code with multiple accounts (work, personal, client projects), switching between them means manually copying credential files every time. Claude Switch makes it a one-command operation.
- One-command switch —
cs use workand you're done - Profile management — Import, list, remove profiles
- Auto-backup — Credentials are backed up before every switch
- Health check —
cs doctordiagnoses your setup - Cross-platform — Linux, macOS, Windows (amd64 & arm64)
- Zero dependencies — Single binary, no runtime required
- Secure — Credentials stored with
0600permissions, no telemetry
curl -fsSL https://raw.githubusercontent.com/caeser1996/claude-switch/main/scripts/install.sh | bashInstalls claude-switch and a cs shortcut to /usr/local/bin. Use INSTALL_DIR to override:
INSTALL_DIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/caeser1996/claude-switch/main/scripts/install.sh | bashbrew install caeser1996/tap/claude-switchDownload the pre-built binary for your platform from GitHub Releases:
| Platform | File |
|---|---|
| Linux x86-64 | claude-switch_X.Y.Z_linux_amd64.tar.gz |
| Linux ARM64 | claude-switch_X.Y.Z_linux_arm64.tar.gz |
| macOS Intel | claude-switch_X.Y.Z_darwin_amd64.tar.gz |
| macOS Apple Silicon | claude-switch_X.Y.Z_darwin_arm64.tar.gz |
| Windows x86-64 | claude-switch_X.Y.Z_windows_amd64.zip |
tar -xzf claude-switch_*_linux_amd64.tar.gz
sudo mv claude-switch /usr/local/bin/
sudo ln -s /usr/local/bin/claude-switch /usr/local/bin/csFrom source (for contributors)
Requires Go 1.24+.
go install github.com/caeser1996/claude-switch@latestOr clone and build:
git clone https://github.com/caeser1996/claude-switch.git
cd claude-switch
make build
# Binary is in ./bin/claude-switch# 1. Log into your work Claude account, then save it
cs import work -d "Work account"
# 2. Log into your personal account, then save it
cs import personal -d "Personal account"
# 3. Switch between them anytime
cs use work # → Switched to "work"
cs use personal # → Switched to "personal"
# 4. See all profiles
cs list| Command | Description |
|---|---|
cs import <name> |
Save current Claude session as a named profile |
cs login <name> |
Run claude login then auto-import as a profile |
cs use <name> |
Switch to a profile (auto-detects .claude-profile) |
cs switch |
Interactive profile selector (TUI) |
cs list |
List all profiles (* = active) |
cs status |
Show auth status and token expiry for all profiles |
cs remove <name> |
Delete a profile |
cs current |
Show active profile name |
cs info <name> |
Detailed info about a profile |
| Command | Description |
|---|---|
cs exec <profile> -- <cmd> |
Run command with profile's credentials (no switch) |
cs limits |
Show usage limits for active profile |
| Command | Description |
|---|---|
cs export <name> |
Export profile as encrypted .csprofile file |
cs import-file <file> |
Import profile from encrypted file |
| Command | Description |
|---|---|
cs alias |
Generate shell aliases (claude-work, claude-personal, etc.) |
cs completion <shell> |
Shell completions (bash, zsh, fish, powershell) |
| Command | Description |
|---|---|
cs doctor |
Run health checks on your installation |
cs backup list |
Show available backups |
cs backup restore <ts> |
Restore from a backup |
cs config show/edit/path |
View or edit configuration |
cs update |
Self-update to the latest release |
cs version |
Show version info |
| Flag | Description |
|---|---|
--verbose, -v |
Verbose output |
--no-color |
Disable colored output |
Claude Switch stores copies of your Claude Code credential files in isolated profile directories:
~/.claude-switch/
├── config.json # Which profile is active
├── profiles/
│ ├── work/
│ │ └── .credentials.json
│ └── personal/
│ └── .credentials.json
└── backups/
└── 20260219-143022/ # Auto-backup before each switch
└── .credentials.json
When you run cs use work:
- Current credentials are backed up
- Work profile credentials are copied to
~/.claude/ - Config is updated to mark "work" as active
That's it. No symlinks, no env vars, no magic.
Create a .claude-profile file in any project directory:
echo "work" > ~/projects/company-app/.claude-profileNow when you run cs use (with no argument) inside that directory, it automatically switches to the work profile. The file is searched up the directory tree, so it works in subdirectories too.
Share profiles securely between machines or team members:
# Export (encrypts with AES-256-GCM)
cs export work -o work.csprofile
# Enter passphrase: ********
# Import on another machine
cs import-file work.csprofile
# Enter passphrase: ********Generate convenience aliases for your shell:
cs alias >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc
# Now you can use:
claude-work # switch to work + launch claude
claude-personal # switch to personal + launch claude
cs-work # just switch to workThe config file lives at ~/.claude-switch/config.json:
{
"active_profile": "work",
"profiles": {
"work": {
"name": "work",
"email": "you@company.com",
"description": "Work account",
"created_at": "2026-02-19T14:30:00Z",
"is_active": true
}
},
"settings": {
"auto_backup": true,
"max_backups": 10,
"color_output": true
}
}- All credential files are stored with
0600permissions (owner read/write only) - Profile directories use
0700permissions - No credentials are printed or logged (even in verbose mode)
- Backups are auto-pruned (default: keep 10 most recent)
- Encrypted exports — AES-256-GCM encryption for shared profiles
- Token expiry detection — Warns when tokens are expired or expiring soon
- No telemetry, no phone-home, fully open source
# Run tests
make test
# Run linter
make lint
# Build for current platform
make build
# Build for all platforms
make build-all
# Clean build artifacts
make clean-
cs exec <profile> -- claude "prompt"— Isolated parallel execution -
cs limits— Usage/rate limit display -
cs completion bash/zsh/fish— Shell completions -
cs backup list/restore— Backup management -
cs update— Self-update from GitHub releases -
cs login <name>— Login and auto-import -
cs export / import-file— Encrypted profile sharing (AES-256-GCM) -
cs status— Token expiry and auth health -
cs switch— Interactive TUI profile selector -
cs alias— Shell alias generation -
.claude-profile— Per-project auto-switch - Token refresh detection and warnings
- Git hook integration (auto-switch based on repo)
- Profile encryption at rest
MIT License. See LICENSE for details.
Sumanta Mukhopadhyay — GitHub