Quick Use
- Copy the YAML below to your repo root as
.aider.conf.yml - Adjust
test-cmdandlint-cmdto your project's commands - Run
aider— config loads automatically
Intro
.aider.conf.yml is Aider's per-project config file. Set the model, lint command, test command, files to auto-add, files to never touch — once. Aider reads it on every run, so you don't keep retyping flags. Best for: teams standardizing how Aider behaves in a specific repo. Works with: Aider 0.40+. Setup time: 30 seconds.
Drop in this template
# .aider.conf.yml — checked into your repo root
# Model selection (architect/editor split saves tokens)
model: claude-3-5-sonnet-20241022
editor-model: claude-3-5-haiku-20241022
weak-model: claude-3-5-haiku-20241022
# Auto-run after each edit
auto-test: true
test-cmd: "pytest -x --no-cov"
lint: true
auto-lint: true
lint-cmd:
- "python: ruff check --fix"
- "javascript: eslint --fix"
# Repo behavior
git: true
auto-commits: true
attribute-author: true
attribute-committer: true
gitignore: true
# Files
read:
- README.md
- docs/architecture.md
- .clinerules
file:
- src/main.py
# Never edit these (secrets, generated, vendored)
no-edit:
- .env
- .env.*
- "*.lock"
- "package-lock.json"
- "yarn.lock"
- "src/generated/**"
# Cost / speed knobs
cache-prompts: true
map-tokens: 1024
max-chat-history-tokens: 8000Per-repo overrides
Aider also reads ~/.aider.conf.yml (user-level) and .aider.conf.yml (repo-level). Repo overrides win. Useful pattern: user-level sets your default API keys + model preferences; repo-level adds project-specific lint commands and read files.
Watch mode
watch-files: trueWith this set, Aider watches your editor for AI-comment markers (# AI: or // AI:) and edits the file when you save. Trigger Aider from VS Code or vim without leaving the editor.
FAQ
Q: Where do I put .aider.conf.yml? A: Repo root works for project-specific config. ~/.aider.conf.yml works for user-wide defaults. Both can coexist — repo-level wins for any setting they both define.
Q: How does no-edit interact with .gitignore?
A: Aider already respects .gitignore by default (the gitignore: true flag). no-edit is for additional protected files that ARE in git but you don't want Aider touching — like generated code, lock files, .env templates.
Q: Will the architect/editor split actually save money? A: Yes — typically 60-80% on long refactors. Architect (Sonnet) plans the change in expensive tokens once; Editor (Haiku, 10x cheaper) applies the actual edits. For small one-line changes the savings are smaller.
Source & Thanks
Pattern derived from Aider documentation. Licensed under Apache-2.0.
Aider-AI/aider — ⭐ 36,000+