Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Claude Account Switcher

A simple shell script to switch between multiple Claude Code accounts (e.g., personal and work).

How it works

Claude Code stores OAuth credentials in the macOS Keychain and account profile data in ~/.claude.json. This script saves and restores both, letting you swap accounts with a single command.

Install

# Clone the repo
git clone https://github.com/benkruseski/ClaudeAcctSwitch.git

# Add to your PATH
ln -s "$(pwd)/ClaudeAcctSwitch/claude-switch" ~/.local/bin/claude-switch

Setup

Save each account as a named profile:

# Log in to your first account and save it
claude auth login
claude-switch save personal

# Log out, log in to the other account, and save it
claude auth logout
claude auth login
claude-switch save work

Usage

claude-switch personal    # Switch to personal account
claude-switch work        # Switch to work account
claude-switch status      # Show which account is active
claude-switch list        # List saved profiles
claude-switch save <name> # Save current login as a profile

After switching, restart any running Claude Code sessions for the change to take effect.

Requirements

  • macOS (uses Keychain for credential storage)
  • Claude Code CLI
  • Python 3 (for reading account metadata)

About

A shell script to switch between multiple Claude Code accounts by saving and restoring macOS Keychain credentials and profile data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages