Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.
-
Create Separate Config Directories
mkdir ~/.claude-account1 mkdir ~/.claude-account2 -
Add Aliases to Shell Config
- Open ~/.zshrc (or ~/.bashrc for Bash) in an editor:
- Add:
alias claude-account1="CLAUDE_CONFIG_DIR=~/.claude-account1 claude" alias claude-account2="CLAUDE_CONFIG_DIR=~/.claude-account2 claude"
- Save and reload:
-
Authenticate Each Account
- For account 1: Log in; credentials save to ~/.claude-account1.
- For account 2: Log in; credentials save to ~/.claude-account2.
-
Switch or Run Simultaneously
- Run claude-account1 or claude-account2 in separate terminal tabs (Cmd + T).
- Each uses its own config and usage limits.
- 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.
.png)
![New Glenn Mission NG-2 Webcast [video]](https://www.youtube.com/img/desktop/supported_browsers/edgium.png)
