Config File Locator

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.

  1. Project local level

    Local overrides

    Personal settings for this project. Run commands from the project root from which you launch Claude Code.

    Config file location
    <project>/.claude/settings.local.json
    If you create this file manually, add it to .gitignore to keep personal settings out of shared commits.
    Commands
    vi "./.claude/settings.local.json"
  2. Shared project level

    Project overrides

    Shared settings for the project. Run commands from the project root from which you launch Claude Code.

    Config file location
    <project>/.claude/settings.json
    The file or its parent directory may not exist until you create project settings.
    Commands
    vi "./.claude/settings.json"
  3. User level

    User defaults

    Applies across projects. CLAUDE_CONFIG_DIR changes the global configuration directory.

    Config file location
    ~/.claude/settings.json
    Default when CLAUDE_CONFIG_DIR is unset. The first command edits this file.
    $CLAUDE_CONFIG_DIR/settings.json
    Used 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.
    Commands
    vi "$HOME/.claude/settings.json"
    vi "$CLAUDE_CONFIG_DIR/settings.json"

Official Claude Code documentation