Feature Request: Support XDG Base Directory Specification for config/data directories

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Jun 12, 2026 · closed Aug 17, 2026

Currently, Claude Code hardcodes ~/.claude/ as the only location for user-level configuration and data. This does not follow the XDG Base Directory Specification, which is the standard on Linux (and supported on macOS) for organizing user files.

Requested behavior

Respect XDG environment variables when they are set:

  • $XDG_CONFIG_HOME/claude (falling back to ~/.claude) for configuration files (settings.json, CLAUDE.md, hooks, etc.)
  • $XDG_DATA_HOME/claude (falling back to ~/.claude) for data files (projects, memory, etc.)

Current workaround

Users can symlink ~/.claude to their preferred XDG-compliant path, but this is fragile and requires manual setup.

Why this matters

Many Linux users and tools (e.g., stow, chezmoi) rely on XDG compliance to manage dotfiles cleanly. Hardcoding ~/.claude pollutes the home directory contrary to established conventions.

View original on GitHub ↗

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