Skip to content

Comparison ​

Several tools help you use more than one Claude Code account on one machine. They solve different problems. This page says which problem each one solves, so you can pick the right one, including when it is not this one.

Who this tool is for ​

People who keep separate Claude accounts for separate purposes: work, personal, a client, a side project. Each project always belongs to one of them, so the account should follow the project, fixed and without thinking about it.

  • Per project, fixed. Each folder maps to one account; subfolders inherit and can override. The same folder always gets the same account.
  • Deterministic. The nearest mapped folder wins, resolved the same way through symlinks, letter case and git worktrees. No state that depends on which account you used last.
  • Good defaults. In a folder with no account yet, claude asks once and remembers. Every login stays live, and your settings, skills, plugins and history are shared, so switching projects never means logging in again.

It is not built for pooling several accounts to stretch rate limits, rotating accounts inside one project, or tracking usage and cost. If that is what you need, the tools below that focus on it will serve you better.

Approaches ​

ApproachHow the account is chosenExamples
Swap the global loginOne login at a time; switching replaces it for the whole machine, running sessions includedclaude-swap, cc-account-switcher, CCSwitcher, ClaudeCodeMultiAccounts
Rotate for limitsMoves to another account when one hits its limit, often with usage dashboardsclaude-swap, clauth, the fairy-pitta fork of cc-account-switcher
Profile per launchA config dir per profile; you pick it with an alias, a flag or a command each timeshell aliases, ccprofile, claude-account-switch (ftery0)
Profile per folderA config dir per profile, chosen by the folder you are inclaude-account, claude-code-profiles, cpm

Tools ​

As of September 2026, from each project's own documentation.

ToolMechanismGranularityFocus
claude-accountOne CLAUDE_CONFIG_DIR per account; the claude shell function picks itPer folder, central mapping (plus optional pin files); asks once where unmappedSeparate accounts by purpose
claude-code-profilesOne CLAUDE_CONFIG_DIR per profile, set by a wrapperGlobal, per shell, or per folder through a .claude-profile file and a cd hookSeparate accounts by purpose
cpmOne CLAUDE_CONFIG_DIR per profile, a wrapper per profilePer command, or per folder through a .claude-profile file and a cd hookSeparate accounts by purpose
claude-account-switchOne CLAUDE_CONFIG_DIR per profilePer shellSeparate accounts by purpose
ccprofileSets CLAUDE_CONFIG_DIR at launchChosen at each launchSeparate accounts by purpose
claude-swapSwaps the default login (Keychain or credentials file); can run one session per accountGlobal, or per terminalRotation at rate limits, usage dashboard
clauthSwaps tokens, or runs a session in its own config dirGlobal or per sessionRotation, usage and cost
cc-account-switcherSwaps the Keychain loginGlobalSwitching (archived)
CCSwitcherSwaps the Keychain login and ~/.claude.jsonGlobalSwitching, usage and cost (macOS app)

How the per-folder tools differ ​

claude-code-profiles and cpm share the idea of choosing the account by folder. The differences that matter day to day:

  • Where the mapping lives. They read a .claude-profile file in the project. claude-account keeps one central mapping, so nothing is added to your repositories; a pin file is optional, for teams that want it committed.
  • A folder with no account yet. claude-account asks once, with the default preselected, and remembers the answer for the whole repository.
  • Resolution. claude-account resolves a folder identically however you reach it: through symlinks, in any letter case on case-insensitive disks, and from git worktrees outside their repository.
  • What stays shared. claude-account shares settings, skills, agents, commands, hooks, plugins and conversation history across accounts through symlinks; only the login is separate.
  • Operations. An installer that shows its plan and converges when run again, doctor, update, and every command usable both interactively and in scripts.

Without a tool ​

Claude Code already supports this through CLAUDE_CONFIG_DIR, which moves its config dir, login included. Two common recipes:

  • An alias per account, such as alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'. You pick the account by hand each time, and each account starts from an empty setup.
  • direnv, with an .envrc exporting CLAUDE_CONFIG_DIR in each project. It switches when you cd, but every project needs its own file and a direnv allow, and folders without one get nothing.

CLAUDE_CODE_OAUTH_TOKEN (from claude setup-token) and ANTHROPIC_PROFILE are aimed at scripts and at Console or API logins, not at keeping several Pro or Max accounts side by side.

MIT licensed. Provided as-is.