Claude Code reads its configuration from JSON settings files. There are three places they live, and each one has a clear job.
| File | Scope | Committed to git? |
|---|---|---|
~/.claude/settings.json | Your user defaults, every project | No, it is your home dir |
.claude/settings.json | This project, shared with the team | Yes, commit it |
.claude/settings.local.json | This project, just you | No, it is gitignored |
The user file holds your personal defaults. The project file holds settings the whole team should share, so you commit it. The local file holds your own overrides for that project, and Claude keeps it out of git so your private tweaks never land in a pull request.
All three use the same shape. Common keys:
{
"model": "sonnet",
"permissions": {
"allow": ["Bash(git status:*)", "Read", "Edit"],
"deny": ["Bash(rm:*)"]
},
"env": { "MY_FLAG": "1" },
"hooks": { }
}
model picks which Claude model runs.permissions.allow and permissions.deny are lists of rule strings that
decide which tools run without asking.env sets environment variables for the session.hooks wires shell commands to events.More specific scopes override broader ones. The local file wins over the
project file, and the project file wins over your user file. So a team can
set a shared model in .claude/settings.json, and you can quietly
override just that value for yourself in .claude/settings.local.json
without touching what everyone else sees.
Your lab setup
This VM comes with Claude Code preinstalled and signed in - just run claude to start.