Use multiple Claude Code accounts with CLAUDE_CONFIG_DIR

Claude Code keeps one login per configuration directory. Give each account its own directory and a shell alias, sign in once in each, and a personal plan and a work plan can stay signed in side by side, in different terminals, at the same time.

How CLAUDE_CONFIG_DIR works

CLAUDE_CONFIG_DIR tells Claude Code where to keep its configuration instead of the default ~/.claude. Settings, session history and plugins live there, and so does the login: each directory has its own claude.ai login or API key.

On macOS the login itself is stored in the Keychain, in an entry keyed to the directory. A session started with a different CLAUDE_CONFIG_DIR reads a different entry, so each account keeps its own login.

1. Add an alias for each extra account

Keep claude for your default account and add an alias for every other one. In zsh, the macOS default shell, that goes in ~/.zshrc; in bash, in ~/.bashrc.

# ~/.zshrc
alias claude-work='CLAUDE_CONFIG_DIR=$HOME/.claude-work claude'

Add one line per extra account, each with its own directory. Open a new terminal so the alias loads.

2. Sign in once per directory

Run claude-work. The first time, Claude Code walks you through login and setup for the new directory, so sign in with the account that belongs there. After that, every claude-work session uses that account.

To confirm which account a terminal is using, type /status in Claude Code. It shows the version, model, account and connectivity.

Good to know

  • Settings live in each directory, so preferences in ~/.claude/settings.json don't follow you into ~/.claude-work. Copy the file across if you want the same setup in both.
  • If you set CLAUDE_CONFIG_DIR in a settings file instead of your shell, write an absolute path. Project and local settings ignore it.
  • Separate directories don't keep two Claude Console sign-ins made without an API key apart, because Claude Code stores that kind of sign-in outside the configuration directory.

3. See every account's limits at once

/usage only reports the account of the terminal you type it in. To see all of them together, notch-limits puts one ring per account around the MacBook notch. Hover it and it expands into each account's five-hour session and weekly windows, with the time each one resets. With two or more Claude Code accounts, the one with the most headroom gets a "Best now" tag.

The expanded notch-limits panel with three accounts. Claude, Max plan, tagged Best now: five-hour window 18%, weekly 31%. Claude Work, Pro plan: five-hour window 80% in orange with the line “At this pace: limit today” under it, weekly 46%. Codex, Plus plan: five-hour window 12%, weekly 30%. Each window shows when it resets.
Three accounts in the expanded notch. Claude has the most headroom, so it gets the Best now tag.

In most setups there is nothing to configure. At launch, and whenever you open Settings, notch-limits looks at the folders directly inside your home folder:

AccountFound whenName it gets
Your default Claude Code account~/.claude.json existsClaude
Each extra Claude Code accounta folder named .claude plus a suffix, such as ~/.claude-work, contains its own .claude.jsonClaude Work
Each Codex account~/.codex, or a folder such as ~/.codex-team, contains an auth.jsonCodex, Codex Team

So the ~/.claude-work folder from step 1 shows up as "Claude Work" the next time the app starts or you open Settings. Discovery only checks that these files exist: it doesn't open them, read your shell configuration or touch the Keychain. Automatic discovery and the Settings window need notch-limits 1.1 or later.

Manage accounts in Settings

Click the gear in the expanded notch, or in the menu bar panel on a Mac without a notch. Every account, found or configured, has a row where you can:

The notch-limits Settings window. Accounts: Claude (~/.claude), Claude Work (~/.claude-work) and Codex (~/.codex), each marked Shown, with arrows to reorder them. Notifications: “Notify at 90% and when a limit resets” is on. A note says accounts in ~/.claude* and ~/.codex* are found automatically and changes are saved to ~/.config/notch-limits/accounts.json.
Settings, with the accounts found in ~/.claude, ~/.claude-work and ~/.codex.

Changes apply immediately, with no restart and no network request, and are saved to ~/.config/notch-limits/accounts.json.

When you still need accounts.json

Only for config folders that aren't directly in your home folder, or aren't named .claude… or .codex…. Add an entry for each one by hand. The easiest start is to change anything in Settings first: it writes every account to the file, and you add yours to that list.

// ~/.config/notch-limits/accounts.json
[
  { "name": "Claude Personal",
    "provider": "claude", "path": "~/.claude" },
  { "name": "Claude Work", "icon": "briefcase.fill",
    "provider": "claude", "path": "~/.claude-work" },
  { "name": "Claude Client", "icon": "building.2.fill",
    "provider": "claude", "path": "~/clients/acme/claude" },
  { "name": "Codex",
    "provider": "codex", "path": "~/.codex" }
]
FieldWhat it is
nameThe label in the expanded panel.
providerclaude or codex.
pathFor Claude, the account's CLAUDE_CONFIG_DIR (default ~/.claude). For Codex, its CODEX_HOME (default ~/.codex).
iconclaude, codex, or any SF Symbol name, such as leaf.fill or briefcase.fill.
enabledOptional. false hides the account. Settings writes it for you.

What it reads for each account

For each directory, notch-limits reads the usage snapshot Claude Code already keeps in that directory's .claude.json (for the default account, ~/.claude.json). It reads the login from the Keychain entry Claude Code created for that directory, through /usr/bin/security, so there is no permission prompt. It only calls the usage endpoint when the snapshot is more than 10 minutes old, and it never refreshes, rewrites or uploads tokens.

Codex works the same way with CODEX_HOME: every ~/.codex… folder with an auth.json is found on its own, and homes kept anywhere else go in accounts.json as codex entries.

Troubleshooting

Get notch-limits

Free, open source and native. No account of its own, no telemetry.

curl -fsSL https://raw.githubusercontent.com/matheusm/notch-limits/main/install.sh | bash

macOS 14+ · Apple Silicon & Intel · 3 MB download. The one-line install puts the app in ~/Applications with no Gatekeeper prompt. The DMG isn't notarized yet: on first launch, open System Settings → Privacy & Security and click Open Anyway.

Next: how to check Claude Code usage limits on a Mac →

Sources

notch-limits is an unofficial community project, not affiliated with or endorsed by Anthropic or OpenAI. Claude Code changes often; the linked docs are the source of truth.