settings.json
settings.json is Claude Code’s settings file, written in JSON format. In it you set permissions, the model, environment variables, hooks and plugins. There are several levels: ~/.claude/settings.json for all your projects, .claude/settings.json for a project’s whole team, and .claude/settings.local.json just for you, in a single project.
Claude Code’s settings file: permissions, hooks, model. The “.local” version is only for you and doesn’t reach git.
How it shows up in Claude Code
Claude Code reads settings from several places and combines them. When the same setting appears in two files, the stronger level wins: your organization’s managed settings, then command-line options, then .claude/settings.local.json, then the project’s .claude/settings.json, and finally your own ~/.claude/settings.json. The project file goes into git so every teammate gets the same rules. The .local file is personal: Claude Code keeps it out of git when it creates it, and writes into it the rules you approve with “Yes, and don’t ask again”.
Example
The team uses Sonnet, but you want Opus just for yourself. In .claude/settings.local.json you write:
{
"model": "claude-opus-5-5"
}
The shared file stays the same, your teammates keep working with Sonnet, and your sessions start on Opus.
Common mistakes
- Passwords and keys in the project’s
settings.json. The file goes into git and everyone sees it. Secrets belong in environment variables or in.env, which you block with adenyrule. - A hand-made
settings.local.jsonthat isn’t ignored. If you create it yourself rather than Claude Code, add it to.gitignoreyourself. - Broken JSON. An extra comma or a missing quote breaks the file. Ask Claude to check it after you edit it.
- Starting Claude from a different folder. Project settings are read from the folder where you start the session; start from the project root.
Related terms and where you learn it
In settings.json you write permissions, hooks and the model; the format is JSON. It differs from CLAUDE.md: CLAUDE.md gives instructions, settings enforce rules. You learn it in the lessons “What is a settings file?” and “Where do the settings files live, and which one matters most?” in module 03, Permissions: what Claude may do.
Source: Claude Code documentation: Settings files and precedence
How it appears in the course
There’s also ~/.claude/settings.json. ~ means your personal folder on the computer (for example /Users/your-name).
Where do the settings files live, and which one matters most? · Module 03, Permissions: what Claude may do
Now I’ll show you a real file: .claude/settings.json. You put it in the .claude folder of your project.
What does a real settings file look like? · Module 03, Permissions: what Claude may do
Terminal only: in the desktop app, /permissions replies “isn't available in this environment”. There you edit .claude/settings.json directly, or ask Claude to edit it.
How do you view and add rules on the fly? · Module 03, Permissions: what Claude may do
Learn Claude Code from zero, in plain English
12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.