[FEATURE] Feature request: CLAUDE_CONFIG_DIR environment variable to control .claude/ directory location

Resolved 💬 3 comments Opened Feb 26, 2026 by nvanwyen Closed Mar 1, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary

Add support for a CLAUDE_CONFIG_DIR environment variable (or similar mechanism) that allows users to specify a fixed location for the project-level .claude/ directory, regardless of
where claude is started from.

Motivation

Currently, the project-level .claude/ directory (containing settings.local.json, CLAUDE.md, etc.) is always created relative to the current working directory. This makes it
difficult to:

  • Maintain a single, centralized configuration when working across many directories
  • Avoid scattering .claude/ directories throughout the filesystem
  • Use Claude Code from temporary or ephemeral directories while preserving settings

Proposed Solution

Proposed Solution

Support an environment variable like CLAUDE_CONFIG_DIR that overrides the default project-level .claude/ path:

export CLAUDE_CONFIG_DIR="$HOME/.config/claude-code"

When set, all project-level config files (settings.local.json, CLAUDE.md, rules, etc.) would be read from and written to this directory instead of ./.claude/.

Alternative Solutions

Alternatives Considered

  • Symlinking .claude/ in each project directory (manual, error-prone)
  • Using --settings flag (only adds settings, doesn't redirect the full config directory)
  • Always starting Claude from the same directory (impractical)

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗