CLAUDE_CONFIG_DIR
Updated by Alex Sorokoletov
CLAUDE_CONFIG_DIR is a Claude Code environment variable: Custom config directory. Present since v2.1.69 or earlier and still present in v2.1.294. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Added | Present since v2.1.69 or earlier |
| Category | Other |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CONFIG_DIR=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CONFIG_DIR": "<value>"
}
}Release notes that mention it
- Claude Code v2.1.83 — 8 New Environment Variables: Security Hardening and the 40-Fix Mega Release
- claude-code-env-vars-v2-1-234
Related variables
CLAUDE_SECURESTORAGE_CONFIG_DIRCLAUDE_CODE_MANAGED_CONFIG_PREFETCH: Turns on a hedged prefetch of the organization's managed settings during startup, so the first managed-settings fetch runs earlier in the launch sequence.CLAUDE_CODE_PROJECT_DIR_NAMECLAUDE_JOB_DIR: Working directory for a background job, independent of the daemon's own cwd.CLAUDE_PROJECT_DIR: Override project directory.GIT_CONFIG_COUNTCLAUDE_CODE_CONFIG_PROBECLAUDE_CODE_CONFIG_WATCH_EVENTS
Frequently asked questions
What does CLAUDE_CONFIG_DIR do?
Custom config directory
Which Claude Code version has CLAUDE_CONFIG_DIR?
Present since v2.1.69 or earlier and still present in v2.1.294.
How do I set CLAUDE_CONFIG_DIR?
Export it before starting Claude Code (export CLAUDE_CONFIG_DIR=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.