Claude Code · Configuration files

Allow and deny tools

In .claude/settings.json, allow safe commands without prompts and block sensitive files.

{
  "permissions": {
    "allow": ["Bash(npm run test:*)", "Bash(git diff:*)"],
    "deny": ["Read(./.env)", "Read(./secrets/**)"]
  }
}

Official Claude Code documentation

More configuration files commands

All configuration files commands · Claude Code cheatsheet

Was this page helpful?