# CLAUDE_CONFIG_DIR

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_PROJECT_DIR_NAME, ~/.claude

## Think of it like

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

## 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

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

## Example code

```bash
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'
claude-work
```

A second command for a work account.

## Why it matters

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

## Common mistake

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

## Three principles

- **Default ~/.claude.** Settings, chats, plugins.
- **Two accounts.** Two folders.
- **Not project settings.** Shell or user.

## Related terms

- [CLAUDE_CODE_PLUGIN_CACHE_DIR](https://learn.benibix.com/term/ai/claude-code-plugin-cache-dir-variable)
- [/config Command](https://learn.benibix.com/term/ai/config-command)
- [Session Transcript](https://learn.benibix.com/term/ai/session-transcript)

![Two config folders side by side: one for each account, picked by CLAUDE_CONFIG_DIR.](https://learn.benibix.com/diagrams/env-config-dir.svg)

---

Source: https://learn.benibix.com/term/ai/claude-config-dir-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
