👾 Using multiple Claude Code accounts

At work, we recently switched to a team wide Claude Code account and I have my personal account that I like to use for my own side projects.

One option to manage this is to run /logout and /login every time you want to switch accounts but that's a bit of a pain.

So instead, you can use the CLAUDE_CONFIG_DIR variable along with custom aliases to use the Claude Code instance you want.

Create directories

mkdir -p ~/.claude-work ~/.claude-personal

Start by creating two directories, one for your personal Claude and one for your work Claude. (You can also do more if you have other accounts)

Set up aliases

# In ~/.zshrc or ~/.bashrc
alias claude-work='CLAUDE_CONFIG_DIR=$HOME/.claude-work claude'
alias claude-personal='CLAUDE_CONFIG_DIR=$HOME/.claude-personal claude'

Set up your aliases and restart your terminal.

Profit?

Now, you should be able to to claude-personal or claude-work depending on the subscription/workspace you want to use and it should work the same way you're used to!