Skip to content

Instantly share code, notes, and snippets.

@daryllukas
Created October 10, 2025 15:40
Show Gist options
  • Select an option

  • Save daryllukas/3df17c09867c0b77657845485b584d4e to your computer and use it in GitHub Desktop.

Select an option

Save daryllukas/3df17c09867c0b77657845485b584d4e to your computer and use it in GitHub Desktop.

How to run Multiple Claude Code Accounts

Run two Claude Code accounts simultaneously on your computer without re-authenticating by using separate configuration directories.

Notes

  • Requires separate Anthropic accounts (different emails).
  • Update Claude Code: npm install -g @anthropic-ai/claude-code.
  • If re-authentication occurs, verify CLAUDE_CONFIG_DIR with echo $CLAUDE_CONFIG_DIR.

Steps

  1. Create Separate Config Directories

    mkdir ~/.claude-personal
    mkdir ~/.claude-work
  2. Add Aliases to Shell Config

    • Open ~/.zshrc (or ~/.bashrc for Bash) in an editor:

      nano ~/.zshrc
    • Add:

      alias claude-personal="CLAUDE_CONFIG_DIR=~/.claude-personal claude"
      alias claude-work="CLAUDE_CONFIG_DIR=~/.claude-work claude"
    • Save and reload:

      source ~/.zshrc
  3. Authenticate Each Account

    • For account 1:
      claude-personal
      After authentication, the credentials are saves to ~/.claude-personal.
    • For account 2:
      claude-work
      After authentication, the credentials are saves to ~/.claude-work.
  4. Switch or Run Simultaneously

    • Run claude-personal or claude-work in separate terminal tabs (Cmd + T).
    • Each uses its own config and usage limits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment