[{"data":1,"prerenderedAt":80},["ShallowReactive",2],{"blog-claude-code-settings-json":3,"blog-related-claude-code-settings-json":59},{"slug":4,"title":5,"description":6,"category":7,"categoryId":8,"keyword":9,"date":10,"minutes":11,"body":12,"html":13,"headings":14},"claude-code-settings-json","Claude Code settings.json explained: every file, every key that matters","Where Claude Code's settings.json files live, which one wins, and the keys you actually use (permissions, env, hooks, model, statusLine), with JSON you can copy and the mistakes that break them.","Getting started","getting-started","claude code settings.json","2026-12-03",9,"Claude Code reads its configuration from a stack of `settings.json` files: one for you, one for the project, one for you in that project, and one your organization may deploy. They merge, and a fixed order decides which value wins when two files disagree. This guide covers the files, that order, the keys most people need and the mistakes that make a setting silently do nothing.\n\nEverything below comes from Anthropic's [settings](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings), [settings reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference) and [permissions](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions) pages, as of December 3, 2026. Claude Code changes often, so check those pages before relying on a detail.\n\n## Which settings.json files does Claude Code read?\n\nFour places, each with its own audience:\n\n| Scope | File | Who it applies to |\n| --- | --- | --- |\n| User | `~\u002F.claude\u002Fsettings.json` | You, in every project on this machine |\n| Shared project | `.claude\u002Fsettings.json` | Everyone working in that folder; commit it so teammates get it |\n| Project local | `.claude\u002Fsettings.local.json` | You, in this one project only |\n| Managed | `managed-settings.json` (and other managed sources) | Everyone your organization deploys it to |\n\nManaged settings live in a system folder that users don't normally edit:\n\n- macOS: `\u002FLibrary\u002FApplication Support\u002FClaudeCode\u002Fmanaged-settings.json`\n- Linux and WSL: `\u002Fetc\u002Fclaude-code\u002Fmanaged-settings.json`\n- Windows: `C:\\Program Files\\ClaudeCode\\managed-settings.json`\n\nA `managed-settings.d\u002F` folder next to it is merged after the base file, in alphabetical order (`10-telemetry.json`, `20-security.json`). Organizations can also push the same settings through MDM on macOS (domain `com.anthropic.claudecode`) or the Windows registry.\n\nOn Windows, `~\u002F.claude` means `%USERPROFILE%\\.claude`. Setting `CLAUDE_CONFIG_DIR` moves the whole user folder somewhere else, which is how people [run several Claude accounts](\u002Fblog\u002Fclaude-code-multiple-accounts).\n\nOne file that is easy to confuse with these: `~\u002F.claude.json`, in your home folder, not inside `~\u002F.claude`. By the docs, it \"holds your account details, MCP server configurations, per-project state such as trust decisions, and the global config keys\". You rarely edit it by hand.\n\n## Which file wins?\n\nFrom highest to lowest priority:\n\n1. **Managed settings.** Nothing overrides them.\n2. **Command line.** `claude --settings \u003Cfile-or-json>` applies to that one session.\n3. **Project local.** `.claude\u002Fsettings.local.json`\n4. **Shared project.** `.claude\u002Fsettings.json`\n5. **User.** `~\u002F.claude\u002Fsettings.json`\n\nTwo details change how that order plays out:\n\n- **Lists merge.** When several files set the same list, such as `permissions.allow`, Claude Code combines them instead of picking one. Each file adds entries without removing another file's. The docs name a few exceptions that don't merge: `fallbackModel`, `modelPicker`, `availableModels` and `modelSettings`.\n- **Environment variables are not a level in the stack.** They work beside it. For example, `ANTHROPIC_MODEL` exported in your shell applies over the `model` key from any file, and `--model` on the command line wins over both.\n\nTo see what is actually loaded, `\u002Fstatus` shows a \"Setting sources\" line, `\u002Fpermissions` lists every permission rule with the file it came from, and `claude doctor` lists settings entries it rejected.\n\n## A starting file you can copy\n\nA project `.claude\u002Fsettings.json` that lets Claude run your scripts and commit, asks before a push, and keeps it out of your `.env`:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fjson.schemastore.org\u002Fclaude-code-settings.json\",\n  \"permissions\": {\n    \"allow\": [\n      \"Bash(npm run *)\",\n      \"Bash(git commit *)\"\n    ],\n    \"ask\": [\n      \"Bash(git push *)\"\n    ],\n    \"deny\": [\n      \"Read(.\u002F.env)\"\n    ]\n  }\n}\n```\n\nThe `$schema` line is optional. It points your editor at the published JSON schema, so you get completion and a warning on a misspelled key.\n\n## Permissions: allow, ask and deny\n\n`permissions` holds three lists of rules:\n\n- **allow**: run without asking.\n- **ask**: always ask, even if another rule would allow it.\n- **deny**: never run.\n\nRules are evaluated in order: deny, then ask, then allow. In the docs' words, \"the first match in that order determines the outcome, and rule specificity doesn't change the order.\" So a broad `Bash(aws *)` in deny blocks `aws s3 ls` even if `Bash(aws s3 ls)` sits in allow. Since lists from every file merge, a deny written in any of them applies.\n\n### The rule syntax\n\nA rule is `Tool` or `Tool(specifier)`. A bare tool name matches every use of that tool.\n\n**Bash.** A `*` matches any text, spaces included, so place it after the subcommand you mean:\n\n```json\n{\n  \"permissions\": {\n    \"allow\": [\n      \"Bash(git log *)\",\n      \"Bash(npm run build)\"\n    ]\n  }\n}\n```\n\n`Bash(git log *)` allows only `git log` commands; `Bash(git *)` would allow every git command, `git push --force` included. The older `:*` suffix still works and means the same thing (`Bash(ls:*)` equals `Bash(ls *)`), but only at the very end of a pattern. For compound commands (`&&`, `||`, `;`, `|`, `|&`, `&`, newlines), each part has to be allowed on its own.\n\n**Read and Edit.** Paths use gitignore syntax, and the leading characters matter:\n\n| Pattern | Means | Example |\n| --- | --- | --- |\n| `\u002F\u002Fpath` | Absolute path from the filesystem root | `Read(\u002F\u002FUsers\u002Falice\u002Fsecrets\u002F**)` |\n| `~\u002Fpath` | From your home folder | `Read(~\u002FDocuments\u002F*.pdf)` |\n| `\u002Fpath` | Relative to the settings file's source (the project, for project settings) | `Edit(\u002Fsrc\u002F**\u002F*.ts)` |\n| `path` or `.\u002Fpath` | Relative to the current directory | `Read(*.env)` |\n\n**WebFetch.** Use the `domain:` prefix. `WebFetch(domain:example.com)` matches that host only; `WebFetch(domain:*.example.com)` matches its subdomains at any depth but not `example.com` itself. Matching is case-insensitive.\n\n**MCP tools.** `mcp__github__*` (or `mcp__github`) matches every tool from the `github` server, `mcp__github__\u003Ctool>` matches one tool, and `mcp__*` matches every MCP tool. To block all of them:\n\n```json\n{\n  \"permissions\": {\n    \"deny\": [\"mcp__*\"]\n  }\n}\n```\n\n### Other keys under permissions\n\n- `defaultMode`: the mode new sessions start in: `default`, `acceptEdits`, `plan`, `auto`, `dontAsk` or `bypassPermissions` (`manual` is accepted as an alias for `default`). What each one does is in [Claude Code permission modes](\u002Fblog\u002Fclaude-code-permission-modes).\n\n```json\n{\n  \"permissions\": {\n    \"defaultMode\": \"acceptEdits\"\n  }\n}\n```\n\n- `additionalDirectories`: gives Claude file access to directories outside the current one.\n- `disableBypassPermissionsMode`: set to `\"disable\"` so nobody can enter `bypassPermissions`. Most often deployed through managed settings.\n\n## env: environment variables for every session\n\n`env` sets variables for every session and every process it starts. Values are strings:\n\n```json\n{\n  \"env\": {\n    \"DISABLE_AUTO_COMPACT\": \"1\",\n    \"ANTHROPIC_BASE_URL\": \"https:\u002F\u002Fproxy.example.com\"\n  }\n}\n```\n\nThe values are plain text in the file. Don't put API keys or tokens here, least of all in a committed `.claude\u002Fsettings.json`. For credentials, the docs offer `apiKeyHelper`, a command whose output Claude Code uses as the API credential:\n\n```json\n{\n  \"apiKeyHelper\": \"\u002Fbin\u002Fgenerate_temp_api_key.sh\"\n}\n```\n\n[Keeping secrets out of Claude Code](\u002Fblog\u002Fclaude-code-secrets) covers the other places keys leak.\n\n## hooks: commands Claude Code runs for you\n\n`hooks` maps an event to commands. This one runs a script before every Bash call:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          { \"type\": \"command\", \"command\": \"~\u002F.claude\u002Fhooks\u002Fcheck-bash.sh\" }\n        ]\n      }\n    ]\n  }\n}\n```\n\n`matcher` takes tool names, and `Edit|Write` matches either. Events include `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `Notification`, `Stop`, `PreCompact` and `SessionEnd`, among about thirty. `\"disableAllHooks\": true` turns them all off, along with any custom status line. Exit codes, matchers and working examples are in [Claude Code hooks](\u002Fblog\u002Fclaude-code-hooks).\n\n## model\n\nSets the model every new session starts with. The docs' example:\n\n```json\n{\n  \"model\": \"claude-sonnet-5\"\n}\n```\n\n`--model` on the command line and `ANTHROPIC_MODEL` in your shell both win over it. Related keys in the reference include `effortLevel` (`\"low\"`, `\"medium\"`, `\"high\"` or `\"xhigh\"`), `fallbackModel` and, for organizations, `availableModels`.\n\n## statusLine\n\nRuns your own command to draw a line under the prompt. Claude Code passes it session data as JSON, and the script prints what to show:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"~\u002F.claude\u002Fstatusline.sh\",\n    \"padding\": 2\n  }\n}\n```\n\n`padding` is optional. The docs suggest putting this in your user settings, since a status line is usually a personal preference.\n\n## MCP servers: not in settings.json\n\nMCP servers are defined in `.mcp.json` at the project root (shared) or in `~\u002F.claude.json` (yours), not in `settings.json`. What `settings.json` holds is whether project servers are approved:\n\n```json\n{\n  \"enabledMcpjsonServers\": [\"memory\", \"github\"]\n}\n```\n\n`\"enableAllProjectMcpServers\": true` approves every server in a project's `.mcp.json` without a prompt, and `disabledMcpjsonServers` rejects the ones you name. Scopes and the `.mcp.json` format are in [Claude Code MCP servers](\u002Fblog\u002Fclaude-code-mcp-servers).\n\n## What do you commit, and what stays local?\n\n- **Commit `.claude\u002Fsettings.json`.** The docs say to commit it \"so everyone who clones the repository gets the same permissions, hooks, and plugin settings.\" Keep it free of personal paths and secrets.\n- **Keep `.claude\u002Fsettings.local.json` local.** When Claude Code creates it, it adds `**\u002F.claude\u002Fsettings.local.json` to your global git excludes file. If you create the file yourself, add it to `.gitignore`.\n- **`~\u002F.claude\u002Fsettings.json` is yours.** It lives outside any repository. If you keep dotfiles in git, the same rule applies: no keys in `env`.\n- **`.mcp.json` can be committed** when its secrets are `${VAR}` references rather than values.\n\nA practical split: team rules (deny `.env`, ask before a push, the project's hooks) in the shared file; your own allow rules and experiments in the local file; your status line, model and personal hooks in the user file.\n\n## Common mistakes\n\n- **Comments or a trailing comma.** Settings files are strict JSON: \"a `\u002F\u002F` comment or a trailing comma is a syntax error.\"\n- **A single slash taken for an absolute path.** `Read(\u002FUsers\u002Falice\u002Ffile)` is anchored at the settings source, not the filesystem root. Write `Read(\u002F\u002FUsers\u002Falice\u002Ffile)`.\n- **Expecting a narrow allow to beat a broad deny.** Deny is checked first, whatever the specificity.\n- **A Bash rule wider than meant.** `Bash(git *)` allows `git push`. Put the `*` after the subcommand: `Bash(git log *)`.\n- **`:*` in the middle of a rule.** It only works at the end; in `Bash(git:* push)` the colon is a literal character.\n- **A `model` key that seems ignored.** Check your shell for `ANTHROPIC_MODEL`, and for `--model` in an alias.\n- **MCP servers added to settings.json.** They belong in `.mcp.json` or `~\u002F.claude.json`.\n- **`cleanupPeriodDays` set to 0** to keep transcripts forever. It fails validation; the docs suggest a large value such as `3650`.\n- **Keys in `env`.** Plain text, passed to every subprocess, and committed if it's the shared file.\n\nWhen a setting doesn't apply, `\u002Fstatus`, `\u002Fpermissions` and `claude doctor` usually tell you why within a minute.\n\n## What does Grok Build's \u002Fimport-claude take from these files?\n\nBy its announcement, Grok Build's `\u002Fimport-claude` brings over Claude Code's permissions, environment variables, MCP servers and hooks: the `permissions`, `env` and `hooks` keys of the files above, and the servers in `.mcp.json` and `~\u002F.claude.json`. The checks to run before importing, and what can hide in each, are in [Grok Build's \u002Fimport-claude and \u002Fresume-claude](\u002Fblog\u002Fgrok-build-import-claude).\n\n## FAQ\n\n**Where is the Claude Code settings.json file?**\n\nYour own is `~\u002F.claude\u002Fsettings.json`. A project's is `.claude\u002Fsettings.json` at its root, with `.claude\u002Fsettings.local.json` beside it for your personal overrides.\n\n**Can I put comments in settings.json?**\n\nNo. It's strict JSON, so comments and trailing commas are syntax errors.\n\n**Does settings.local.json override settings.json?**\n\nFor single values, yes: project local sits above shared project. For lists such as `permissions.allow`, both files' entries are combined.\n\n**How do I change settings without editing JSON?**\n\nRun `\u002Fconfig` inside Claude Code and open the Config tab, or `\u002Fpermissions` to manage permission rules.\n\n**Is settings.json the same as ~\u002F.claude.json?**\n\nNo. `~\u002F.claude.json` holds your account details, MCP servers and per-project state. `settings.json` holds permissions, env, hooks, model and the other keys above.\n\n## More on configuring Claude Code\n\n- [Claude Code permission modes](\u002Fblog\u002Fclaude-code-permission-modes)\n- [Claude Code hooks](\u002Fblog\u002Fclaude-code-hooks)\n- [Claude Code MCP servers](\u002Fblog\u002Fclaude-code-mcp-servers)\n- [Keeping secrets out of Claude Code](\u002Fblog\u002Fclaude-code-secrets)\n- [Using several Claude accounts](\u002Fblog\u002Fclaude-code-multiple-accounts)\n- [Grok Build's \u002Fimport-claude](\u002Fblog\u002Fgrok-build-import-claude)\n\n## In Relais\n\nRelais is a Mac app that runs real Claude Code sessions, so they read the same `settings.json` files as Claude Code in a terminal: your user file, the project's and your local one. When you add more Claude accounts in Relais, each gets its own Claude Code folder whose `settings.json`, skills and plugins are links to your usual `~\u002F.claude`. Only the login differs, so a session that moves from one account to another keeps the same permission rules, hooks and env. Relais is not affiliated with Anthropic. An iPhone app is coming soon.","\u003Cp>Claude Code reads its configuration from a stack of \u003Ccode>settings.json\u003C\u002Fcode> files: one for you, one for the project, one for you in that project, and one your organization may deploy. They merge, and a fixed order decides which value wins when two files disagree. This guide covers the files, that order, the keys most people need and the mistakes that make a setting silently do nothing.\u003C\u002Fp>\n\u003Cp>Everything below comes from Anthropic&#39;s \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings\">settings\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference\">settings reference\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions\">permissions\u003C\u002Fa> pages, as of December 3, 2026. Claude Code changes often, so check those pages before relying on a detail.\u003C\u002Fp>\n\u003Ch2 id=\"which-settings-json-files-does-claude-code-read\">\u003Ca class=\"anchor\" href=\"#which-settings-json-files-does-claude-code-read\" aria-label=\"Link to this section\">#\u003C\u002Fa>Which settings.json files does Claude Code read?\u003C\u002Fh2>\n\u003Cp>Four places, each with its own audience:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Scope\u003C\u002Fth>\u003Cth>File\u003C\u002Fth>\u003Cth>Who it applies to\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>User\u003C\u002Ftd>\u003Ctd>\u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>You, in every project on this machine\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Shared project\u003C\u002Ftd>\u003Ctd>\u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Everyone working in that folder; commit it so teammates get it\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Project local\u003C\u002Ftd>\u003Ctd>\u003Ccode>.claude\u002Fsettings.local.json\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>You, in this one project only\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Managed\u003C\u002Ftd>\u003Ctd>\u003Ccode>managed-settings.json\u003C\u002Fcode> (and other managed sources)\u003C\u002Ftd>\u003Ctd>Everyone your organization deploys it to\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Managed settings live in a system folder that users don&#39;t normally edit:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>macOS: \u003Ccode>\u002FLibrary\u002FApplication Support\u002FClaudeCode\u002Fmanaged-settings.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Linux and WSL: \u003Ccode>\u002Fetc\u002Fclaude-code\u002Fmanaged-settings.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Windows: \u003Ccode>C:\\Program Files\\ClaudeCode\\managed-settings.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A \u003Ccode>managed-settings.d\u002F\u003C\u002Fcode> folder next to it is merged after the base file, in alphabetical order (\u003Ccode>10-telemetry.json\u003C\u002Fcode>, \u003Ccode>20-security.json\u003C\u002Fcode>). Organizations can also push the same settings through MDM on macOS (domain \u003Ccode>com.anthropic.claudecode\u003C\u002Fcode>) or the Windows registry.\u003C\u002Fp>\n\u003Cp>On Windows, \u003Ccode>~\u002F.claude\u003C\u002Fcode> means \u003Ccode>%USERPROFILE%\\.claude\u003C\u002Fcode>. Setting \u003Ccode>CLAUDE_CONFIG_DIR\u003C\u002Fcode> moves the whole user folder somewhere else, which is how people \u003Ca href=\"\u002Fblog\u002Fclaude-code-multiple-accounts\">run several Claude accounts\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>One file that is easy to confuse with these: \u003Ccode>~\u002F.claude.json\u003C\u002Fcode>, in your home folder, not inside \u003Ccode>~\u002F.claude\u003C\u002Fcode>. By the docs, it &quot;holds your account details, MCP server configurations, per-project state such as trust decisions, and the global config keys&quot;. You rarely edit it by hand.\u003C\u002Fp>\n\u003Ch2 id=\"which-file-wins\">\u003Ca class=\"anchor\" href=\"#which-file-wins\" aria-label=\"Link to this section\">#\u003C\u002Fa>Which file wins?\u003C\u002Fh2>\n\u003Cp>From highest to lowest priority:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Managed settings.\u003C\u002Fstrong> Nothing overrides them.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Command line.\u003C\u002Fstrong> \u003Ccode>claude --settings &lt;file-or-json&gt;\u003C\u002Fcode> applies to that one session.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Project local.\u003C\u002Fstrong> \u003Ccode>.claude\u002Fsettings.local.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Shared project.\u003C\u002Fstrong> \u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>User.\u003C\u002Fstrong> \u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Two details change how that order plays out:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Lists merge.\u003C\u002Fstrong> When several files set the same list, such as \u003Ccode>permissions.allow\u003C\u002Fcode>, Claude Code combines them instead of picking one. Each file adds entries without removing another file&#39;s. The docs name a few exceptions that don&#39;t merge: \u003Ccode>fallbackModel\u003C\u002Fcode>, \u003Ccode>modelPicker\u003C\u002Fcode>, \u003Ccode>availableModels\u003C\u002Fcode> and \u003Ccode>modelSettings\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Environment variables are not a level in the stack.\u003C\u002Fstrong> They work beside it. For example, \u003Ccode>ANTHROPIC_MODEL\u003C\u002Fcode> exported in your shell applies over the \u003Ccode>model\u003C\u002Fcode> key from any file, and \u003Ccode>--model\u003C\u002Fcode> on the command line wins over both.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>To see what is actually loaded, \u003Ccode>\u002Fstatus\u003C\u002Fcode> shows a &quot;Setting sources&quot; line, \u003Ccode>\u002Fpermissions\u003C\u002Fcode> lists every permission rule with the file it came from, and \u003Ccode>claude doctor\u003C\u002Fcode> lists settings entries it rejected.\u003C\u002Fp>\n\u003Ch2 id=\"a-starting-file-you-can-copy\">\u003Ca class=\"anchor\" href=\"#a-starting-file-you-can-copy\" aria-label=\"Link to this section\">#\u003C\u002Fa>A starting file you can copy\u003C\u002Fh2>\n\u003Cp>A project \u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode> that lets Claude run your scripts and commit, asks before a push, and keeps it out of your \u003Ccode>.env\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"$schema\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"https:\u002F\u002Fjson.schemastore.org\u002Fclaude-code-settings.json\"\u003C\u002Fspan>,\n  \u003Cspan class=\"hljs-string\">\"permissions\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"allow\"\u003C\u002Fspan>: [\n      \u003Cspan class=\"hljs-string\">\"Bash(npm run *)\"\u003C\u002Fspan>,\n      \u003Cspan class=\"hljs-string\">\"Bash(git commit *)\"\u003C\u002Fspan>\n    ],\n    \u003Cspan class=\"hljs-string\">\"ask\"\u003C\u002Fspan>: [\n      \u003Cspan class=\"hljs-string\">\"Bash(git push *)\"\u003C\u002Fspan>\n    ],\n    \u003Cspan class=\"hljs-string\">\"deny\"\u003C\u002Fspan>: [\n      \u003Cspan class=\"hljs-string\">\"Read(.\u002F.env)\"\u003C\u002Fspan>\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The \u003Ccode>$schema\u003C\u002Fcode> line is optional. It points your editor at the published JSON schema, so you get completion and a warning on a misspelled key.\u003C\u002Fp>\n\u003Ch2 id=\"permissions-allow-ask-and-deny\">\u003Ca class=\"anchor\" href=\"#permissions-allow-ask-and-deny\" aria-label=\"Link to this section\">#\u003C\u002Fa>Permissions: allow, ask and deny\u003C\u002Fh2>\n\u003Cp>\u003Ccode>permissions\u003C\u002Fcode> holds three lists of rules:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>allow\u003C\u002Fstrong>: run without asking.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>ask\u003C\u002Fstrong>: always ask, even if another rule would allow it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>deny\u003C\u002Fstrong>: never run.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Rules are evaluated in order: deny, then ask, then allow. In the docs&#39; words, &quot;the first match in that order determines the outcome, and rule specificity doesn&#39;t change the order.&quot; So a broad \u003Ccode>Bash(aws *)\u003C\u002Fcode> in deny blocks \u003Ccode>aws s3 ls\u003C\u002Fcode> even if \u003Ccode>Bash(aws s3 ls)\u003C\u002Fcode> sits in allow. Since lists from every file merge, a deny written in any of them applies.\u003C\u002Fp>\n\u003Ch3 id=\"the-rule-syntax\">\u003Ca class=\"anchor\" href=\"#the-rule-syntax\" aria-label=\"Link to this section\">#\u003C\u002Fa>The rule syntax\u003C\u002Fh3>\n\u003Cp>A rule is \u003Ccode>Tool\u003C\u002Fcode> or \u003Ccode>Tool(specifier)\u003C\u002Fcode>. A bare tool name matches every use of that tool.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Bash.\u003C\u002Fstrong> A \u003Ccode>*\u003C\u002Fcode> matches any text, spaces included, so place it after the subcommand you mean:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"permissions\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"allow\"\u003C\u002Fspan>: [\n      \u003Cspan class=\"hljs-string\">\"Bash(git log *)\"\u003C\u002Fspan>,\n      \u003Cspan class=\"hljs-string\">\"Bash(npm run build)\"\u003C\u002Fspan>\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>Bash(git log *)\u003C\u002Fcode> allows only \u003Ccode>git log\u003C\u002Fcode> commands; \u003Ccode>Bash(git *)\u003C\u002Fcode> would allow every git command, \u003Ccode>git push --force\u003C\u002Fcode> included. The older \u003Ccode>:*\u003C\u002Fcode> suffix still works and means the same thing (\u003Ccode>Bash(ls:*)\u003C\u002Fcode> equals \u003Ccode>Bash(ls *)\u003C\u002Fcode>), but only at the very end of a pattern. For compound commands (\u003Ccode>&amp;&amp;\u003C\u002Fcode>, \u003Ccode>||\u003C\u002Fcode>, \u003Ccode>;\u003C\u002Fcode>, \u003Ccode>|\u003C\u002Fcode>, \u003Ccode>|&amp;\u003C\u002Fcode>, \u003Ccode>&amp;\u003C\u002Fcode>, newlines), each part has to be allowed on its own.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Read and Edit.\u003C\u002Fstrong> Paths use gitignore syntax, and the leading characters matter:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Pattern\u003C\u002Fth>\u003Cth>Means\u003C\u002Fth>\u003Cth>Example\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>\u002F\u002Fpath\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Absolute path from the filesystem root\u003C\u002Ftd>\u003Ctd>\u003Ccode>Read(\u002F\u002FUsers\u002Falice\u002Fsecrets\u002F**)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>~\u002Fpath\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>From your home folder\u003C\u002Ftd>\u003Ctd>\u003Ccode>Read(~\u002FDocuments\u002F*.pdf)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>\u002Fpath\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Relative to the settings file&#39;s source (the project, for project settings)\u003C\u002Ftd>\u003Ctd>\u003Ccode>Edit(\u002Fsrc\u002F**\u002F*.ts)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>path\u003C\u002Fcode> or \u003Ccode>.\u002Fpath\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Relative to the current directory\u003C\u002Ftd>\u003Ctd>\u003Ccode>Read(*.env)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>WebFetch.\u003C\u002Fstrong> Use the \u003Ccode>domain:\u003C\u002Fcode> prefix. \u003Ccode>WebFetch(domain:example.com)\u003C\u002Fcode> matches that host only; \u003Ccode>WebFetch(domain:*.example.com)\u003C\u002Fcode> matches its subdomains at any depth but not \u003Ccode>example.com\u003C\u002Fcode> itself. Matching is case-insensitive.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>MCP tools.\u003C\u002Fstrong> \u003Ccode>mcp__github__*\u003C\u002Fcode> (or \u003Ccode>mcp__github\u003C\u002Fcode>) matches every tool from the \u003Ccode>github\u003C\u002Fcode> server, \u003Ccode>mcp__github__&lt;tool&gt;\u003C\u002Fcode> matches one tool, and \u003Ccode>mcp__*\u003C\u002Fcode> matches every MCP tool. To block all of them:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"permissions\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"deny\"\u003C\u002Fspan>: [\u003Cspan class=\"hljs-string\">\"mcp__*\"\u003C\u002Fspan>]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3 id=\"other-keys-under-permissions\">\u003Ca class=\"anchor\" href=\"#other-keys-under-permissions\" aria-label=\"Link to this section\">#\u003C\u002Fa>Other keys under permissions\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>\u003Ccode>defaultMode\u003C\u002Fcode>: the mode new sessions start in: \u003Ccode>default\u003C\u002Fcode>, \u003Ccode>acceptEdits\u003C\u002Fcode>, \u003Ccode>plan\u003C\u002Fcode>, \u003Ccode>auto\u003C\u002Fcode>, \u003Ccode>dontAsk\u003C\u002Fcode> or \u003Ccode>bypassPermissions\u003C\u002Fcode> (\u003Ccode>manual\u003C\u002Fcode> is accepted as an alias for \u003Ccode>default\u003C\u002Fcode>). What each one does is in \u003Ca href=\"\u002Fblog\u002Fclaude-code-permission-modes\">Claude Code permission modes\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"permissions\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"defaultMode\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"acceptEdits\"\u003C\u002Fspan>\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cul>\n\u003Cli>\u003Ccode>additionalDirectories\u003C\u002Fcode>: gives Claude file access to directories outside the current one.\u003C\u002Fli>\n\u003Cli>\u003Ccode>disableBypassPermissionsMode\u003C\u002Fcode>: set to \u003Ccode>&quot;disable&quot;\u003C\u002Fcode> so nobody can enter \u003Ccode>bypassPermissions\u003C\u002Fcode>. Most often deployed through managed settings.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"env-environment-variables-for-every-session\">\u003Ca class=\"anchor\" href=\"#env-environment-variables-for-every-session\" aria-label=\"Link to this section\">#\u003C\u002Fa>env: environment variables for every session\u003C\u002Fh2>\n\u003Cp>\u003Ccode>env\u003C\u002Fcode> sets variables for every session and every process it starts. Values are strings:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"env\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"DISABLE_AUTO_COMPACT\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"1\"\u003C\u002Fspan>,\n    \u003Cspan class=\"hljs-string\">\"ANTHROPIC_BASE_URL\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"https:\u002F\u002Fproxy.example.com\"\u003C\u002Fspan>\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The values are plain text in the file. Don&#39;t put API keys or tokens here, least of all in a committed \u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode>. For credentials, the docs offer \u003Ccode>apiKeyHelper\u003C\u002Fcode>, a command whose output Claude Code uses as the API credential:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"apiKeyHelper\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"\u002Fbin\u002Fgenerate_temp_api_key.sh\"\u003C\u002Fspan>\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ca href=\"\u002Fblog\u002Fclaude-code-secrets\">Keeping secrets out of Claude Code\u003C\u002Fa> covers the other places keys leak.\u003C\u002Fp>\n\u003Ch2 id=\"hooks-commands-claude-code-runs-for-you\">\u003Ca class=\"anchor\" href=\"#hooks-commands-claude-code-runs-for-you\" aria-label=\"Link to this section\">#\u003C\u002Fa>hooks: commands Claude Code runs for you\u003C\u002Fh2>\n\u003Cp>\u003Ccode>hooks\u003C\u002Fcode> maps an event to commands. This one runs a script before every Bash call:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"PreToolUse\"\u003C\u002Fspan>: [\n      {\n        \u003Cspan class=\"hljs-string\">\"matcher\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"Bash\"\u003C\u002Fspan>,\n        \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [\n          { \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"~\u002F.claude\u002Fhooks\u002Fcheck-bash.sh\"\u003C\u002Fspan> }\n        ]\n      }\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>matcher\u003C\u002Fcode> takes tool names, and \u003Ccode>Edit|Write\u003C\u002Fcode> matches either. Events include \u003Ccode>SessionStart\u003C\u002Fcode>, \u003Ccode>UserPromptSubmit\u003C\u002Fcode>, \u003Ccode>PreToolUse\u003C\u002Fcode>, \u003Ccode>PostToolUse\u003C\u002Fcode>, \u003Ccode>Notification\u003C\u002Fcode>, \u003Ccode>Stop\u003C\u002Fcode>, \u003Ccode>PreCompact\u003C\u002Fcode> and \u003Ccode>SessionEnd\u003C\u002Fcode>, among about thirty. \u003Ccode>&quot;disableAllHooks&quot;: true\u003C\u002Fcode> turns them all off, along with any custom status line. Exit codes, matchers and working examples are in \u003Ca href=\"\u002Fblog\u002Fclaude-code-hooks\">Claude Code hooks\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"model\">\u003Ca class=\"anchor\" href=\"#model\" aria-label=\"Link to this section\">#\u003C\u002Fa>model\u003C\u002Fh2>\n\u003Cp>Sets the model every new session starts with. The docs&#39; example:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"model\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"claude-sonnet-5\"\u003C\u002Fspan>\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>--model\u003C\u002Fcode> on the command line and \u003Ccode>ANTHROPIC_MODEL\u003C\u002Fcode> in your shell both win over it. Related keys in the reference include \u003Ccode>effortLevel\u003C\u002Fcode> (\u003Ccode>&quot;low&quot;\u003C\u002Fcode>, \u003Ccode>&quot;medium&quot;\u003C\u002Fcode>, \u003Ccode>&quot;high&quot;\u003C\u002Fcode> or \u003Ccode>&quot;xhigh&quot;\u003C\u002Fcode>), \u003Ccode>fallbackModel\u003C\u002Fcode> and, for organizations, \u003Ccode>availableModels\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"statusline\">\u003Ca class=\"anchor\" href=\"#statusline\" aria-label=\"Link to this section\">#\u003C\u002Fa>statusLine\u003C\u002Fh2>\n\u003Cp>Runs your own command to draw a line under the prompt. Claude Code passes it session data as JSON, and the script prints what to show:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"statusLine\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>,\n    \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"~\u002F.claude\u002Fstatusline.sh\"\u003C\u002Fspan>,\n    \u003Cspan class=\"hljs-string\">\"padding\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-number\">2\u003C\u002Fspan>\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>padding\u003C\u002Fcode> is optional. The docs suggest putting this in your user settings, since a status line is usually a personal preference.\u003C\u002Fp>\n\u003Ch2 id=\"mcp-servers-not-in-settings-json\">\u003Ca class=\"anchor\" href=\"#mcp-servers-not-in-settings-json\" aria-label=\"Link to this section\">#\u003C\u002Fa>MCP servers: not in settings.json\u003C\u002Fh2>\n\u003Cp>MCP servers are defined in \u003Ccode>.mcp.json\u003C\u002Fcode> at the project root (shared) or in \u003Ccode>~\u002F.claude.json\u003C\u002Fcode> (yours), not in \u003Ccode>settings.json\u003C\u002Fcode>. What \u003Ccode>settings.json\u003C\u002Fcode> holds is whether project servers are approved:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"enabledMcpjsonServers\"\u003C\u002Fspan>: [\u003Cspan class=\"hljs-string\">\"memory\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"github\"\u003C\u002Fspan>]\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>&quot;enableAllProjectMcpServers&quot;: true\u003C\u002Fcode> approves every server in a project&#39;s \u003Ccode>.mcp.json\u003C\u002Fcode> without a prompt, and \u003Ccode>disabledMcpjsonServers\u003C\u002Fcode> rejects the ones you name. Scopes and the \u003Ccode>.mcp.json\u003C\u002Fcode> format are in \u003Ca href=\"\u002Fblog\u002Fclaude-code-mcp-servers\">Claude Code MCP servers\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"what-do-you-commit-and-what-stays-local\">\u003Ca class=\"anchor\" href=\"#what-do-you-commit-and-what-stays-local\" aria-label=\"Link to this section\">#\u003C\u002Fa>What do you commit, and what stays local?\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Commit \u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode>.\u003C\u002Fstrong> The docs say to commit it &quot;so everyone who clones the repository gets the same permissions, hooks, and plugin settings.&quot; Keep it free of personal paths and secrets.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keep \u003Ccode>.claude\u002Fsettings.local.json\u003C\u002Fcode> local.\u003C\u002Fstrong> When Claude Code creates it, it adds \u003Ccode>**\u002F.claude\u002Fsettings.local.json\u003C\u002Fcode> to your global git excludes file. If you create the file yourself, add it to \u003Ccode>.gitignore\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode> is yours.\u003C\u002Fstrong> It lives outside any repository. If you keep dotfiles in git, the same rule applies: no keys in \u003Ccode>env\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>.mcp.json\u003C\u002Fcode> can be committed\u003C\u002Fstrong> when its secrets are \u003Ccode>${VAR}\u003C\u002Fcode> references rather than values.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A practical split: team rules (deny \u003Ccode>.env\u003C\u002Fcode>, ask before a push, the project&#39;s hooks) in the shared file; your own allow rules and experiments in the local file; your status line, model and personal hooks in the user file.\u003C\u002Fp>\n\u003Ch2 id=\"common-mistakes\">\u003Ca class=\"anchor\" href=\"#common-mistakes\" aria-label=\"Link to this section\">#\u003C\u002Fa>Common mistakes\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Comments or a trailing comma.\u003C\u002Fstrong> Settings files are strict JSON: &quot;a \u003Ccode>\u002F\u002F\u003C\u002Fcode> comment or a trailing comma is a syntax error.&quot;\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A single slash taken for an absolute path.\u003C\u002Fstrong> \u003Ccode>Read(\u002FUsers\u002Falice\u002Ffile)\u003C\u002Fcode> is anchored at the settings source, not the filesystem root. Write \u003Ccode>Read(\u002F\u002FUsers\u002Falice\u002Ffile)\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Expecting a narrow allow to beat a broad deny.\u003C\u002Fstrong> Deny is checked first, whatever the specificity.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A Bash rule wider than meant.\u003C\u002Fstrong> \u003Ccode>Bash(git *)\u003C\u002Fcode> allows \u003Ccode>git push\u003C\u002Fcode>. Put the \u003Ccode>*\u003C\u002Fcode> after the subcommand: \u003Ccode>Bash(git log *)\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>:*\u003C\u002Fcode> in the middle of a rule.\u003C\u002Fstrong> It only works at the end; in \u003Ccode>Bash(git:* push)\u003C\u002Fcode> the colon is a literal character.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A \u003Ccode>model\u003C\u002Fcode> key that seems ignored.\u003C\u002Fstrong> Check your shell for \u003Ccode>ANTHROPIC_MODEL\u003C\u002Fcode>, and for \u003Ccode>--model\u003C\u002Fcode> in an alias.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>MCP servers added to settings.json.\u003C\u002Fstrong> They belong in \u003Ccode>.mcp.json\u003C\u002Fcode> or \u003Ccode>~\u002F.claude.json\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>cleanupPeriodDays\u003C\u002Fcode> set to 0\u003C\u002Fstrong> to keep transcripts forever. It fails validation; the docs suggest a large value such as \u003Ccode>3650\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keys in \u003Ccode>env\u003C\u002Fcode>.\u003C\u002Fstrong> Plain text, passed to every subprocess, and committed if it&#39;s the shared file.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>When a setting doesn&#39;t apply, \u003Ccode>\u002Fstatus\u003C\u002Fcode>, \u003Ccode>\u002Fpermissions\u003C\u002Fcode> and \u003Ccode>claude doctor\u003C\u002Fcode> usually tell you why within a minute.\u003C\u002Fp>\n\u003Ch2 id=\"what-does-grok-build-39-s-import-claude-take-from-these-files\">\u003Ca class=\"anchor\" href=\"#what-does-grok-build-39-s-import-claude-take-from-these-files\" aria-label=\"Link to this section\">#\u003C\u002Fa>What does Grok Build&#39;s \u002Fimport-claude take from these files?\u003C\u002Fh2>\n\u003Cp>By its announcement, Grok Build&#39;s \u003Ccode>\u002Fimport-claude\u003C\u002Fcode> brings over Claude Code&#39;s permissions, environment variables, MCP servers and hooks: the \u003Ccode>permissions\u003C\u002Fcode>, \u003Ccode>env\u003C\u002Fcode> and \u003Ccode>hooks\u003C\u002Fcode> keys of the files above, and the servers in \u003Ccode>.mcp.json\u003C\u002Fcode> and \u003Ccode>~\u002F.claude.json\u003C\u002Fcode>. The checks to run before importing, and what can hide in each, are in \u003Ca href=\"\u002Fblog\u002Fgrok-build-import-claude\">Grok Build&#39;s \u002Fimport-claude and \u002Fresume-claude\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"faq\">\u003Ca class=\"anchor\" href=\"#faq\" aria-label=\"Link to this section\">#\u003C\u002Fa>FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Where is the Claude Code settings.json file?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Your own is \u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode>. A project&#39;s is \u003Ccode>.claude\u002Fsettings.json\u003C\u002Fcode> at its root, with \u003Ccode>.claude\u002Fsettings.local.json\u003C\u002Fcode> beside it for your personal overrides.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Can I put comments in settings.json?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>No. It&#39;s strict JSON, so comments and trailing commas are syntax errors.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Does settings.local.json override settings.json?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>For single values, yes: project local sits above shared project. For lists such as \u003Ccode>permissions.allow\u003C\u002Fcode>, both files&#39; entries are combined.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>How do I change settings without editing JSON?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Run \u003Ccode>\u002Fconfig\u003C\u002Fcode> inside Claude Code and open the Config tab, or \u003Ccode>\u002Fpermissions\u003C\u002Fcode> to manage permission rules.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Is settings.json the same as ~\u002F.claude.json?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>No. \u003Ccode>~\u002F.claude.json\u003C\u002Fcode> holds your account details, MCP servers and per-project state. \u003Ccode>settings.json\u003C\u002Fcode> holds permissions, env, hooks, model and the other keys above.\u003C\u002Fp>\n\u003Ch2 id=\"more-on-configuring-claude-code\">\u003Ca class=\"anchor\" href=\"#more-on-configuring-claude-code\" aria-label=\"Link to this section\">#\u003C\u002Fa>More on configuring Claude Code\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fclaude-code-permission-modes\">Claude Code permission modes\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fclaude-code-hooks\">Claude Code hooks\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fclaude-code-mcp-servers\">Claude Code MCP servers\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fclaude-code-secrets\">Keeping secrets out of Claude Code\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fclaude-code-multiple-accounts\">Using several Claude accounts\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fgrok-build-import-claude\">Grok Build&#39;s \u002Fimport-claude\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"in-relais\">\u003Ca class=\"anchor\" href=\"#in-relais\" aria-label=\"Link to this section\">#\u003C\u002Fa>In Relais\u003C\u002Fh2>\n\u003Cp>Relais is a Mac app that runs real Claude Code sessions, so they read the same \u003Ccode>settings.json\u003C\u002Fcode> files as Claude Code in a terminal: your user file, the project&#39;s and your local one. When you add more Claude accounts in Relais, each gets its own Claude Code folder whose \u003Ccode>settings.json\u003C\u002Fcode>, skills and plugins are links to your usual \u003Ccode>~\u002F.claude\u003C\u002Fcode>. Only the login differs, so a session that moves from one account to another keeps the same permission rules, hooks and env. Relais is not affiliated with Anthropic. An iPhone app is coming soon.\u003C\u002Fp>\n",[15,18,21,24,27,30,33,35,38,41,44,47,50,53,56],{"id":16,"text":17},"which-settings-json-files-does-claude-code-read","Which settings.json files does Claude Code read?",{"id":19,"text":20},"which-file-wins","Which file wins?",{"id":22,"text":23},"a-starting-file-you-can-copy","A starting file you can copy",{"id":25,"text":26},"permissions-allow-ask-and-deny","Permissions: allow, ask and deny",{"id":28,"text":29},"env-environment-variables-for-every-session","env: environment variables for every session",{"id":31,"text":32},"hooks-commands-claude-code-runs-for-you","hooks: commands Claude Code runs for you",{"id":34,"text":34},"model",{"id":36,"text":37},"statusline","statusLine",{"id":39,"text":40},"mcp-servers-not-in-settings-json","MCP servers: not in settings.json",{"id":42,"text":43},"what-do-you-commit-and-what-stays-local","What do you commit, and what stays local?",{"id":45,"text":46},"common-mistakes","Common mistakes",{"id":48,"text":49},"what-does-grok-build-39-s-import-claude-take-from-these-files","What does Grok Build's \u002Fimport-claude take from these files?",{"id":51,"text":52},"faq","FAQ",{"id":54,"text":55},"more-on-configuring-claude-code","More on configuring Claude Code",{"id":57,"text":58},"in-relais","In Relais",[60,66,73],{"slug":61,"title":62,"description":63,"category":7,"categoryId":8,"keyword":64,"date":65,"minutes":11},"migrate-cursor-to-claude-code","How to migrate from Cursor to Claude Code: rules, MCP servers and ignore files, step by step","Moving from Cursor (now Grok Build) to Claude Code. Turn .cursor\u002Frules and .cursorrules into CLAUDE.md and .claude\u002Frules, .cursor\u002Fmcp.json into .mcp.json, .cursorignore into deny rules, and keep your editor.","migrate from cursor to claude code","2026-11-30",{"slug":67,"title":68,"description":69,"category":7,"categoryId":8,"keyword":70,"date":71,"minutes":72},"claude-code-on-linux","Claude Code on Linux: install, sign in, and the interfaces you can use","How to install Claude Code on Ubuntu, Debian, Fedora or Alpine, sign in with your Claude plan on a desktop or over SSH, keep it updated, and which graphical interfaces run on Linux today.","claude code linux","2026-11-27",5,{"slug":74,"title":75,"description":76,"category":7,"categoryId":8,"keyword":77,"date":78,"minutes":79},"claude-code-secrets","Claude Code and API keys: keep your secrets out of the chat","How to give Claude Code the API keys it needs without leaking them: environment variables, .env and .gitignore, deny rules, the sandbox and the Keychain.","claude code api keys","2026-11-25",6,1796309899352]