Skip to content
BENIBIX Learn

CLAUDE_CONFIG_DIR

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_PROJECT_DIR_NAME, ~/.claude

It moves Claude Code's own folder, ~/.claude by default.

Think of it like

It is like you give each child their own toy box.

Example

Emma has a home account and a work account. She makes a claude-work alias with its own folder, and the two never mix.

Why it matters

One folder holds one login and one history. A second folder keeps two lives apart.

Definition

CLAUDE_CONFIG_DIR moves the folder where Claude Code keeps its settings, past chats and plugins. By default that is ~/.claude. Point two names at two folders, and you can run two accounts side by side. Set it in your shell, user settings or managed settings. Project settings ignore it.

Example code

bash
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'
claude-work
A second command for a work account.
Each account gets its own folder.

Common mistake

Putting it in project settings. Claude Code has already read its folder by then, so it is ignored.

Key takeaways

  1. 1
    Default ~/.claude. Settings, chats, plugins.
  2. 2
    Two accounts. Two folders.
  3. 3
    Not project settings. Shell or user.