Skip to content

golangthang/claude-code-multi-account-switch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Multi-Account Switcher

Quickly switch between multiple Claude Code accounts.

Installation

./init.sh
source ~/.bashrc

The init.sh script automatically creates convenient aliases for all commands:

  • claude-switchclaude-switch.sh
  • claude-syncclaude-sync.sh
  • claude-nextclaude-next.sh
  • claude-usagepython3 claude-usage.py

After installation, you can run these commands from anywhere in your terminal!

Usage

1. Save account

claude login                    # Login
claude-switch save work         # Save as "work"

2. Switch account

claude-switch work
claude-switch personal

3. Other commands

claude-switch list      # List all accounts
Screenshot from 2025-12-22 22-51-28
claude-switch status    # Show current account
Screenshot from 2025-12-22 22-51-04
claude-next             # Switch to next account (round-robin)
Screenshot from 2025-12-22 22-50-34
claude-usage            # Show usage of all accounts
Screenshot from 2025-12-22 22-51-49

Sync Sessions Between Accounts

Share conversation history between all accounts so claude --resume works on any account.

claude-sync    # Cross-sync all sessions between accounts

Workflow

# Work on account1, create new session
claude-switch account1
claude

# Sync sessions to all accounts
claude-sync

# Switch to account2, resume same session
claude-switch account2
claude --resume

Notes

  • Data stored at ~/.claude-accounts/
  • Script auto-backups before switching
  • Each account keeps its own login token
  • Sync only shares conversation history, not tokens
  • claude-usage requires Python 3 (uses standard library only, no pip install needed)

claude-code-multi-account-switch

About

Claude Code Multi-Account Switcher

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 54.1%
  • Python 45.9%