How to use two Claude Code accounts on one computer
Claude Code keeps its sign-in, settings and history in one folder. Give each account its own folder, and both stay signed in. The setting for this is CLAUDE_CONFIG_DIR. Anthropic describes it in its own documentation.
Windows
Open PowerShell and run these lines. Sign in with your second account when Claude Code asks.
$env:CLAUDE_CONFIG_DIR = "$HOME\.claude-work"
claude
The setting only counts for that window. A new window uses your normal account again.
Mac and Linux
Add this line to your shell file, such as ~/.zshrc or ~/.bashrc. Then open a new terminal.
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'
Now claude starts your first account, and claude-work starts the second one.
Three things to check
- API keys: if
ANTHROPIC_API_KEYis set on your computer, Claude Code may use that key instead of your account. - Which account is active: type
/statusinside Claude Code. - The folder: it holds your sign-in. Never share it or put it into a project.
The same without typing commands
AI Account Hub gives every account its own folder and opens each one in its own terminal. Usual API keys set on your computer are hidden from the tool.

Is this allowed?
Anthropic's documentation explains how to stay signed in to several accounts, such as work and personal. Follow the rules of each account, and don't use a second account to get around limits.
Try AI Account Hub. Free while in beta, for Windows, Mac and Linux.
Download