Download

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

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.

Several Claude, ChatGPT and Gemini accounts in AI Account Hub
AI Account Hub with sample content.

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

More guides