Skip to content

About

No description, website, or topics provided.

Resources

Stars

42 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Switch

Run your work and personal Claude Code accounts side by side.

One machine. Multiple logins. Zero friction.

License: MIT macOS Linux Claude Code

Claude Switch interactive menu

The Problem

Claude Code stores one login per machine. If you have a work account (Team/Enterprise) and a personal account (Pro/Max), you have to /logout and /login every time you switch. That gets old fast.

The Fix

claude-switch work        # launches Claude with your work account
claude-switch personal    # launches Claude with your personal account

That's it. Both can run in separate terminals, simultaneously.


Install

curl -fsSL https://raw.githubusercontent.com/SaschaHeyer/claude-switch/main/install.sh | sh

Or with Homebrew:

brew install gum  # required dependency
curl -fsSL https://raw.githubusercontent.com/SaschaHeyer/claude-switch/main/install.sh | sh
Manual install
# Download
curl -fsSL https://raw.githubusercontent.com/SaschaHeyer/claude-switch/main/claude-switch \
  -o ~/.local/bin/claude-switch

# Make executable
chmod +x ~/.local/bin/claude-switch

# Install gum for interactive UI
brew install gum
Uninstall
curl -fsSL https://raw.githubusercontent.com/SaschaHeyer/claude-switch/main/install.sh | sh -s -- uninstall

Quick Start

1. Create profiles

claude-switch create work
claude-switch create personal

2. Launch Claude with a profile

claude-switch work

Claude opens with that profile's account. On first launch, it'll ask you to log in — you only do this once per profile.

3. Run both side by side

Open two terminals:

Terminal 1                    Terminal 2
$ claude-switch work          $ claude-switch personal

Each runs with its own OAuth session, history, and usage tracking. Your skills, settings, and CLAUDE.md are shared across all profiles.


Commands

Command Description
claude-switch <name> Launch Claude with that profile
claude-switch create [name] Create a new profile
claude-switch list Show all profiles and login status
claude-switch delete [name] Delete a profile
claude-switch sync Sync project sessions across all profiles
claude-switch Interactive menu
claude-switch help Show help

How It Works

Claude Code reads its config from ~/.claude/. Claude Switch creates separate directories (~/.claude-work/, ~/.claude-personal/) and tells Claude which one to use via CLAUDE_CONFIG_DIR.

~/.claude/              ← default profile
~/.claude-work/         ← work profile
~/.claude-personal/     ← personal profile

Shared across profiles (via symlinks):

  • skills/ — your custom skills
  • settings.json — preferences
  • CLAUDE.md — global instructions
  • plugins/ — installed plugins

Isolated per profile:

  • OAuth credentials (macOS Keychain)
  • Session history
  • Usage tracking
  • Project permissions

Syncing sessions across profiles

Hit your usage limit on one profile? Sync sessions to another and /resume right where you left off:

claude-switch sync           # bidirectional sync, all profiles
claude-switch sync --dry-run # preview what would change
claude-switch sync -v        # show per-file detail

sync copies projects/ and plans/ between all profiles using a "latest wins" strategy — safe to run repeatedly.


FAQ

Does this work with Claude Pro, Max, Team, and Enterprise?

Yes. Any combination of Claude account types works. A common setup is Team/Enterprise for work + Pro/Max for personal projects.

Can I run both profiles at the same time?

Yes. Each terminal is an independent Claude session with its own login. That's the whole point.

What about my existing Claude setup?

Untouched. Your current ~/.claude/ directory becomes your "default" profile. Claude Switch never modifies it — it only creates new directories alongside it.

Do I need to re-login every time?

No. You log in once per profile. The OAuth tokens are stored in the macOS Keychain and persist across sessions.

What if I want different skills per profile?

By default, skills are symlinked (shared). To use separate skills, remove the symlink and copy the skills directory instead:

rm ~/.claude-work/skills
cp -r ~/.claude/skills ~/.claude-work/skills
Does this work on Linux?

Yes. The only macOS-specific part is Keychain storage for OAuth tokens. On Linux, Claude Code stores credentials in ~/.claude/.credentials.json, which is already isolated per config directory.

Can I continue a conversation after hitting my usage limit?

Yes. Run claude-switch sync after hitting your limit, then launch a different profile and use /resume to pick up where you left off. The sync copies session files bidirectionally so each profile has a complete view of all conversations.

Does this violate Anthropic's Terms of Service?

No. Claude Switch is a local shell script that manages separate ~/.claude/ config directories. It doesn't touch, extract, or relay any OAuth tokens. It simply sets the CLAUDE_CONFIG_DIR environment variable and launches the official claude binary. All authentication and API calls are handled directly by Claude Code — nothing leaves your machine through claude-switch.


Requirements

  • Claude Code v2.x+
  • gum (auto-installed via Homebrew if missing)
  • macOS or Linux
  • bash 3.2+

Contributing

Contributions welcome. Open an issue or PR.


License

MIT


Claude Switch is not affiliated with Anthropic.

About

No description, website, or topics provided.

Resources

Stars

42 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages