CLAUDE.md, and the CLI commands to inspect or change configuration. Follow these guidelines to keep Claude Code predictable, secure, and team-friendly.

- Claude Code uses a combination of configuration files and CLI settings to control permissions, environment variables, telemetry, UI preferences, and other behaviors.
- Settings are applied at three scopes:
- User-level: personal settings on a developer’s machine.
- Project-level: repository-scoped settings stored under a
.claudefolder and shared with the team. - Enterprise-managed: centrally applied, organization-wide managed settings.
Welcome message (what you see when you start Claude Code in a repo)
- Location (typical):
- macOS / Linux:
~/.claude/settings.json - Windows:
C:\ProgramData\claude-code\settings.json(or similar under ProgramData)
- macOS / Linux:
- These files control your personal defaults (theme, model selection, telemetry opt-ins, etc.). If you use an editor alias (e.g.,
codefor VS Code) and it’s not available, the CLI will fall back to another editor likevim.
code alias is missing
- Use
.claude/settings.jsonat the repository root for team-shared defaults and permissions. This file is version-controlled so the whole team receives the same base configuration. - For per-developer preferences that should not be checked in, use
.claude/settings.local.json. Claude Code will add this file to.gitignorewhen present.
settings.json (valid JSON)
settings.local.json (ignored by git)
- Organizations can enforce managed settings which are applied system-wide. These settings typically live in OS-specific paths:
Expanded enterprise settings example (permissions, defaultMode, additional directories)
Enterprise managed settings can override local or project settings in certain areas. If you rely on specific environment variables or permission behavior, confirm with your administrator before assuming local overrides will apply.
- Full list of settings, permission patterns, and examples: https://docs.anthropic.com/en/docs/claude-code/settings
CLAUDE.mdis a per-project file that Claude Code loads into memory at startup. Use it to provide context, development commands, testing instructions, linting/formatting guidance, and anything that helps the assistant act like a project-aware collaborator.- You can create
CLAUDE.mdwith the/initcommand or author it manually.
CLAUDE.md for a Python Flask application (this is the file content — you can create it with /init or ask Claude to generate it):
Keep
CLAUDE.md concise and focused: include the commands you want Claude to run, important file locations, test instructions, and any known quirks. This improves the assistant’s relevance and reduces noisy suggestions.- Claude loads
CLAUDE.mdfor every session, so include things that help the assistant act immediately (build steps, test commands, primary entry points). - Avoid embedding secrets in
CLAUDE.md. Use it for developer-friendly context and commands only.
- Common toggles and preferences you may find in user or project settings:
- to-do list visibility
- checkpointing (useful for reverting assistant-proposed edits)
- verbose output / logging
- model selection and safety settings
- theme (dark/light) and Vim mode
- diff tool preference and auto-install IDE extension
- Checkpointing is particularly useful when Claude proposes multi-file edits—if a proposed change breaks the build, you can quickly revert to a previous state.
- Use deny patterns to prevent Claude Code from reading secrets, build artifacts, or any directory you want protected. For example:
Explicitly deny access to any files containing secrets or credentials. Do not rely solely on
.gitignore—deny patterns prevent the assistant from reading files even if they exist in the repo.- The
claudeCLI lists, gets, and sets configuration at local or global levels. It’s useful for scripting or quick inspection of current settings.
claude config list returns a JSON object with current config:
- Set a global config (affects all projects on the machine):
- Read a specific key:
claude config set without a value, the CLI will prompt you. To avoid prompts, always provide the key and value on the command line, for example:
- Recommended workflow:
- Create
.claude/settings.jsonwith team defaults and permission rules. - Add
.claude/settings.local.jsonper-developer for local preferences; do not check this in. - Author
CLAUDE.mdwith project context, dev commands, and test instructions. - Use
claude configto inspect or adjust local/global CLI behavior as needed.
- Create
CLAUDE.md or run locally):
- Claude Code settings: https://docs.anthropic.com/en/docs/claude-code/settings
- Kubernetes docs (general reference): https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
- Docker Hub: https://hub.docker.com/
- Terraform Registry: https://registry.terraform.io/