Skip to main content
The /config slash command (aliased as /settings) opens an interactive settings panel inside a running Claude Code session. It is not a standalone CLI subcommand with get / set subcommands — configuration is managed through the panel UI or by editing the settings JSON files directly.
/config
/settings
Run claude --settings <file> to load additional settings from a JSON file or inline JSON string at startup, before the session begins.

Settings files

Claude Code merges settings from multiple sources in order of precedence (highest to lowest):
SourceLocationScope
CLI --settings flagPath or inline JSONSession only
Local settings.claude/settings.local.jsonProject, not committed
Project settings.claude/settings.jsonProject, committed
User settings~/.claude/settings.jsonAll projects
Managed settingsSystem-level pathEnterprise-managed

Key settings fields

The settings files follow a JSON schema. Common fields include:
model
string
Override the default model used by Claude Code. Accepts a model alias (e.g. "sonnet") or a full model ID (e.g. "claude-sonnet-4-6").
permissions.defaultMode
string
Default permission mode. Choices: default, acceptEdits, bypassPermissions, dontAsk, plan.
permissions.allow
string[]
List of permission rules for allowed operations (e.g. ["Bash(git:*)"]).
permissions.deny
string[]
List of permission rules for denied operations.
env
object
Environment variables to set for Claude Code sessions (key-value string pairs).
hooks
object
Custom commands to run before or after tool executions. See the hooks documentation for the full schema.
cleanupPeriodDays
number
Number of days to retain chat transcripts (default: 30). Set to 0 to disable session persistence entirely — no transcripts are written and existing ones are deleted at startup.
includeCoAuthoredBy
boolean
Deprecated. Use attribution instead. Whether to include Claude’s co-authored-by attribution in commits and pull requests (defaults to true).
attribution.commit
string
Attribution text appended to git commits. Set to an empty string to hide attribution.
attribution.pr
string
Attribution text appended to pull request descriptions. Set to an empty string to hide attribution.
respectGitignore
boolean
Whether the file picker should respect .gitignore files (default: true). Note: .ignore files are always respected.
defaultShell
string
Default shell for input-box ! commands. Choices: bash, powershell. Defaults to bash on all platforms.
disableAllHooks
boolean
Disable all hooks and the status line execution.

Example settings file

~/.claude/settings.json
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "model": "claude-sonnet-4-6",
  "permissions": {
    "defaultMode": "acceptEdits",
    "allow": ["Bash(git:*)"],
    "deny": ["Bash(rm -rf:*)"]
  },
  "env": {
    "NODE_ENV": "development"
  },
  "cleanupPeriodDays": 60
}
Use the --setting-sources flag at startup to control which sources are loaded: claude --setting-sources user,project.

Build docs developers (and LLMs) love