Forked from KMJ-007/Manage Multiple Claude Code Accounts.md
Created
September 24, 2025 13:56
-
-
Save paulocastellano/09c138aef77422d4a5d5556c3f389fe9 to your computer and use it in GitHub Desktop.
Revisions
-
KMJ-007 created this gist
Jul 22, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ # Manage Multiple Claude Code Accounts Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories. ## Steps 1. **Create Separate Config Directories** ```bash mkdir ~/.claude-account1 mkdir ~/.claude-account2 ``` 2. **Add Aliases to Shell Config** - Open `~/.zshrc` (or `~/.bashrc` for Bash) in an editor: ```bash nano ~/.zshrc ``` - Add: ```bash alias claude-account1="CLAUDE_CONFIG_DIR=~/.claude-account1 claude" alias claude-account2="CLAUDE_CONFIG_DIR=~/.claude-account2 claude" ``` - Save and reload: ```bash source ~/.zshrc ``` 3. **Authenticate Each Account** - For account 1: ```bash claude-account1 ``` Log in; credentials save to `~/.claude-account1`. - For account 2: ```bash claude-account2 ``` Log in; credentials save to `~/.claude-account2`. 4. **Switch or Run Simultaneously** - Run `claude-account1` or `claude-account2` in separate terminal tabs (Cmd + T). - Each uses its own config and usage limits. ## Notes - Requires separate Anthropic accounts (different emails). - Check Anthropic’s terms to ensure compliance. - Update Claude Code: `npm install -g @anthropic-ai/claude-code`. - If re-authentication occurs, verify `CLAUDE_CONFIG_DIR` with `echo $CLAUDE_CONFIG_DIR`.