Skip to content

Configuration

Claude Code is highly configurable. Learn how to customize its behavior, model, memory, and global or per-project preferences.

Main configuration file

Claude Code stores its configuration in ~/.claude/settings.json (global configuration) and in .claude/settings.json inside each project (local configuration, which takes priority).

Terminal
# View current configuration in Claude Code:
/config

# Or edit directly:
nano ~/.claude/settings.json

Example settings.json

Terminal
{
  "model": "sonnet",
  "theme": "dark",
  "autoUpdates": true,
  "permissions": {
    "allow": [
      "Bash(npm:*)",
      "Bash(git:*)",
      "Read(**)",
      "Edit(**)"
    ],
    "deny": [
      "Bash(rm -rf:*)",
      "WebFetch(domain:evil.com)"
    ]
  },
  "env": {
    "NODE_ENV": "development"
  }
}

CLAUDE.md — Project memory

The CLAUDE.md file at the root of your project is Claude Code's "memory". When you start a session, Claude reads this file automatically to understand your project's context.

Create CLAUDE.md automatically

Terminal
# Inside Claude Code:
/init

Claude Code will analyze your project and generate a CLAUDE.md with the structure, tech stack, important commands, and conventions.

Recommended CLAUDE.md structure

Terminal
# Project: My App

## Stack
- Frontend: Next.js 16 + TypeScript + Tailwind CSS
- Backend: Node.js + Express + PostgreSQL
- Tests: Vitest + Playwright

## Essential commands
```bash
npm run dev          # Start dev server (port 3000)
npm run test         # Run tests
npm run build        # Production build
npm run db:migrate   # Run migrations
```

## Project structure
- /app — Next.js pages (App Router)
- /components — Reusable components
- /lib — Utilities and configuration
- /prisma — Database schema

## Conventions
- Use kebab-case for file names
- Components use the .tsx suffix
- Tests live next to the file they test (*.test.ts)

## Important notes
- The main branch is protected; work on feature branches
- Local DB is at localhost:5432, user: dev, no password

Environment variables

Claude Code reads environment variables from your shell. The most important ones:

Default model

You can change the model Claude Code uses in each session. The default value depends on your account and provider; to avoid outdated IDs, use aliases like sonnet, opus, or haiku.

Terminal
# In settings.json:
{ "model": "opus" }

# Or as an environment variable:
export ANTHROPIC_MODEL="opus"

# Or when starting Claude Code:
claude --model opus

VS Code integration

Install the Claude Code extension from the VS Code Marketplace. After installing it, Claude Code appears in the side panel and works with the same context as your open project.

  • Keyboard shortcuts: Cmd + Shift + P → "Claude Code"
  • Inline suggestions while writing code
  • Integrated chat panel with context from the active file
  • Diff view to review proposed changes

JetBrains integration

Available on the JetBrains Marketplace for IntelliJ IDEA, PyCharm, WebStorm, etc. Same capabilities as the VS Code extension.

Proxy configuration

If you work behind a corporate proxy:

Terminal
export HTTPS_PROXY="https://proxy.company.com:8080"
export HTTP_PROXY="http://proxy.company.com:8080"
# Then start Claude Code normally
claude

Multiple profiles / projects

To use different API keys or configurations across projects, create a .claude/settings.json in each project with its own values. Claude Code detects them automatically.

Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue