5/18/2026

Claude Code: switching between multiple accounts

If you have a personal Claude account and a work one, logging out and back in every time you switch context gets old fast. The good news: you don't have to. Claude Code reads its config — including who you're logged in as — from whatever directory CLAUDE_CONFIG_DIR points at. Give each account its own directory and they stop fighting over the same login.

A few aliases is all it takes:

alias claude-personal="CLAUDE_CONFIG_DIR=$HOME/.claude-personal claude"
alias claude-work="CLAUDE_CONFIG_DIR=$HOME/.claude-work claude"
alias claude="echo 'Use claude-personal, claude-work'"

The first two run Claude against separate config directories, so each keeps its own login. The third one is the trick that makes it stick: it overrides the bare claude command to nag you, so you never accidentally fire up an ambiguous session and wonder which account you're burning.

Why this is better than logging in and out

The directories are fully independent, which means you can run both at the same timeclaude-work in one terminal, claude-personal in another — without them stepping on each other. Two sessions, two accounts, side by side.

That also means two separate sets of usage limits. Which pairs nicely with lining up your session windows: if you prime each account's window deliberately, you've got two independent 5-hour clocks to play with instead of one.

Drop the aliases in your .zshrc (or .bashrc), open a new shell, and you're done.

Part 1 of 2
Claude Code Tips
All parts
  1. 1. Claude Code: switching between multiple accounts
  2. 2. Claude Code: line up your session windows