Settings Reference
Configuration Files
Section titled “Configuration Files”Directory~/.claude/
- config.json (global settings)
- credentials.json (auth tokens)
- settings.local.json (local overrides)
- mcp.json (MCP server config)
config.json
Section titled “config.json”{ "model": "claude-sonnet-4-5", "theme": "dark", "autoApprove": [ "git status", "git diff", "ls", "cat" ], "permissions": { "allowedCommands": ["git", "npm", "python", "pytest"], "blockedPaths": ["~/.ssh", "~/.aws", "~/.gnupg"] }}Settings Options
Section titled “Settings Options”Default model to use.
| Model | Full ID | Best For |
|---|---|---|
| Opus 4.5 | claude-opus-4-5 | Most capable, complex tasks |
| Sonnet 4 | claude-sonnet-4-5 | Balanced (recommended) |
| Haiku 4 | claude-haiku-4-5 | Fast, lightweight, CI/CD |
autoApprove
Section titled “autoApprove”Commands to run without asking permission.
"autoApprove": ["git status", "git diff", "pytest", "npm test"]permissions.allowedCommands
Section titled “permissions.allowedCommands”Whitelist of command prefixes allowed to run.
permissions.blockedPaths
Section titled “permissions.blockedPaths”Paths Claude cannot read or write.
permissions (advanced)
Section titled “permissions (advanced)”Use patterns for fine-grained control:
{ "permissions": { "deny": ["Read(**/.env)", "Bash(rm -rf *)"], "ask": ["Bash(git push*)"] }}Environment Variables
Section titled “Environment Variables”# API ConfigurationANTHROPIC_API_KEY=sk-ant-...ANTHROPIC_BASE_URL=https://api.anthropic.com
# Internal/Custom setupANTHROPIC_AUTH_TOKEN=...ANTHROPIC_BASE_URL=https://your-proxy.comProject Settings
Section titled “Project Settings”Create .claude/settings.json in your project:
{ "model": "claude-sonnet-4-5", "context": { "include": ["src/", "tests/"], "exclude": ["node_modules/", "*.log"] }}Hooks Configuration
Section titled “Hooks Configuration”In settings.local.json:
{ "hooks": { "Stop": [{ "hooks": [{ "type": "command", "command": "notify-send 'Claude finished'" }] }], "PreToolUse": [{ "matcher": {"tool": "Bash"}, "hooks": [{ "type": "command", "command": "python3 ~/.claude/hooks/check.py" }] }] }}See Hooks guide for details.
Configuration Hierarchy
Section titled “Configuration Hierarchy”Settings load in priority order (highest first):
- Enterprise managed - System-wide (admins can enforce settings users can’t override)
.claude/settings.local.json- Project personal (gitignored).claude/settings.json- Project team (committed)~/.claude/settings.json- User global
Higher priority settings override lower ones.