Skip to main content

Claude Code Switcher

A lightweight CLI tool for switching between Claude Code profiles with different MCP server configurations and authentication methods.

Features #

  • Quick Profile Switching: Interactive TUI for selecting profiles
  • Dual Auth Support: Standard Claude account (keychain) and Vertex AI (env vars)
  • MCP Configuration: Automatic merging of MCP server configs
  • Beautiful TUI: Clean, keyboard-driven interface with visual indicators
  • Secure: Credentials stored in system keyring (macOS Keychain / Linux Secret Service)
  • Self-Contained: Single binary with no external dependencies

Installation #

Homebrew (macOS/Linux) #

brew install virtuallytd/tap/claude-code-switcher

Shell Integration - Add to ~/.zshrc or ~/.bashrc:

ccs() {
  # If no arguments, "switch", or "reload", run with eval
  if [[ $# -eq 0 ]] || [[ "$1" == "switch" ]] || [[ "$1" == "reload" ]]; then
    eval "$(command ccs "$@")"
  else
    # Pass through other commands (save, current, version, help) directly
    command ccs "$@"
  fi
}

Reload your shell:

source ~/.zshrc

Verify:

ccs version

Manual Install #

  1. Download the latest binary from releases
  2. Extract and move to your PATH:
    tar -xzf ccs_*.tar.gz
    sudo mv ccs /usr/local/bin/
    
  3. Add the shell function above to your shell config

From Source #

git clone https://github.com/virtuallytd/claude-code-switcher
cd claude-code-switcher
make install

Usage #

Switch Profiles #

Interactive profile selector:

ccs

Navigate with arrow keys or j/k, select with Enter, quit with q, Esc, or Ctrl+C.

Reload Current Profile #

Re-apply the current profile without interactive selection:

ccs reload

Save Session Token #

Save your current Claude Code session token for a profile:

claude login              # Login to Claude first
ccs save personal         # Save token for "personal" profile

Show Current Profile #

ccs current

Platform Support #

  • macOS: Uses Keychain for secure token storage
  • Linux: Uses Secret Service (gnome-keyring, KWallet)
  • Windows: Not currently supported