Claude Code config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
These paths assume Claude Code is launched from the project root. For ordinary conflicting settings, project-local settings take precedence over shared project settings, then user settings. Lists can merge across layers. Managed settings and CLI options can take precedence over these files.
Project local level
Local overridesPersonal settings for this project. Run commands from the project root from which you launch Claude Code.
Config file location
If you create this file manually, add it to .gitignore to keep personal settings out of shared commits.<project>/.claude/settings.local.jsonCommands
vi "./.claude/settings.local.json"Shared project level
Project overridesShared settings for the project. Run commands from the project root from which you launch Claude Code.
Config file location
The file or its parent directory may not exist until you create project settings.<project>/.claude/settings.jsonCommands
vi "./.claude/settings.json"User level
User defaultsApplies across projects. CLAUDE_CONFIG_DIR changes the global configuration directory.
Config file location
Default when CLAUDE_CONFIG_DIR is unset. The first command edits this file.~/.claude/settings.jsonUsed instead when CLAUDE_CONFIG_DIR is set. Use the second command only when this variable points to your configuration location. These are alternative paths for the same user settings.$CLAUDE_CONFIG_DIR/settings.jsonCommands
vi "$HOME/.claude/settings.json"vi "$CLAUDE_CONFIG_DIR/settings.json"
Official Claude Code documentation