dotmd
// Config Record

>.aider.conf.yml — Opinionated Defaults

Aider YAML configuration with pragmatic model, edit format, linting, and safety defaults for daily coding sessions.

author:
dotmd Team
license:CC0
published:Feb 23, 2026
// Installation

>Add this file to your project repository:

  • Aider
    .aider.conf.yml
// File Content
.aider.conf.yml
1# =============================================================================
2# .aider.conf.yml — Opinionated Defaults
3# Drop this in your repo root. Override per-project as needed.
4# Docs: https://aider.chat/docs/config/aider_conf.html
5# =============================================================================
6
7# --- Model Configuration ---
8
9# Sonnet is the best balance of speed, cost, and code quality for daily work.
10# Switch to opus/o1 for complex refactors; use the comments below.
11model: anthropic/claude-sonnet-4-20250514
12# model: openai/o3 # Strong at multi-file architectural changes
13# model: anthropic/claude-opus-4-20250514 # Best quality, 5x cost — use for hard problems
14# model: deepseek/deepseek-chat # Budget option, surprisingly capable
15
16# Weak model handles commit messages, summaries, and repo-map ranking.
17# Haiku is fast and cheap — no reason to burn tokens on metadata tasks.
18weak-model: anthropic/claude-haiku-3-5-20241022
19
20# Editor model for architect mode — does the planning step before edits.
21# Only matters if you enable architect mode below.
22editor-model: anthropic/claude-sonnet-4-20250514
23
24# --- Edit Format ---
25
26# "diff" is the default for most models and balances token efficiency with
27# reliability. Use "whole" if you see malformed diffs on smaller models.
28edit-format: diff
29# edit-format: whole # More tokens but never breaks — good for weaker models
30# edit-format: udiff # Unified diff — works well with OpenAI models
31
32# Architect mode: one model plans, another edits. Adds a round-trip but
33# catches more design issues. Uncomment for complex projects.
34# architect: true
35
36# --- Git & Commit Behavior ---
37
38# Auto-commit every successful edit. This is the killer feature — gives you
39# granular undo via git. Disable only if you want to batch changes manually.
40auto-commits: true
41
42# Dirty commits: allow aider to commit even when you have staged changes.
43# Off by default to avoid accidentally bundling your manual work into aider commits.
44dirty-commits: false
45
46# Aider's commit messages are good enough. Prefix them so you can filter
47# in git log (e.g., `git log --grep="^aider:"`).
48attribute-commit-message-author: false
49attribute-commit-message-committer: false
50
51# --- Lint & Test Integration ---
52
53# Run lint after every edit. Aider will auto-fix lint errors it introduced.
54# Replace with your actual lint command. Must exit 0 on success.
55# lint-cmd: "ruff check --fix ." # Python
56# lint-cmd: "eslint --fix ." # JavaScript/TypeScript
57# lint-cmd: "cargo clippy -- -D warnings" # Rust
58
59# Run tests after edits. Aider reads test output and iterates on failures.
60# This is where aider really shines — tight edit-test loops.
61# test-cmd: "pytest -x -q" # Python — stop on first failure
62# test-cmd: "npm test" # Node.js
63# test-cmd: "cargo test" # Rust
64
65# How many times aider will retry after lint/test failures before giving up.
66# 3 strikes is enough — if it can't fix it in 3 tries, you need to intervene.
67auto-lint: true
68auto-test: false
69
70# --- Context & Performance ---
71
72# Repo map gives aider a bird's-eye view of your codebase structure.
73# "auto" includes it when useful; the token budget controls how much.
74map-tokens: 2048
75map-refresh: auto
76
77# Limit chat history to keep context focused. Raise for long refactoring
78# sessions, lower if you hit token limits on smaller models.
79max-chat-history-tokens: 4096
80
81# Cache prompts to cut costs and latency on providers that support it
82# (Anthropic prompt caching, OpenAI). No downside to enabling this.
83cache-prompts: true
84
85# Stream responses for faster perceived latency. Disable if you're
86# piping output or running in CI.
87stream: true
88
89# --- Safety & Workflow ---
90
91# Show diffs before applying. Turning this off speeds up the flow but
92# means you trust aider's changes sight-unseen. Keep on until you're comfortable.
93show-diffs: true
94
95# Don't suggest running shell commands without asking. Safety net against
96# aider running `rm -rf` or installing packages without your OK.
97suggest-shell-commands: true
98
99# Max number of files to auto-add to the chat when aider detects they're
100# relevant. 15 is generous but keeps context manageable. Set to 0 to always
101# be asked before adding files.
102auto-add: 15
103
104# Subtree-only mode: restrict aider to files under the current directory.
105# Useful in monorepos to avoid accidentally editing sibling packages.
106subtree-only: false
107
108# --- Input & Output ---
109
110# Pretty output with colors. Disable for CI/non-interactive use.
111pretty: true
112
113# Dark mode optimized colors (most terminals are dark).
114dark-mode: true
115
116# Disable the telemetry/analytics if you care about that.
117analytics: false
118
119# Vim keybindings in the chat input. Uncomment if you're a vim user.
120# vim: true
121
122# --- Files to Ignore ---
123
124# Aider respects .gitignore automatically. For additional ignores
125# (e.g., generated files you don't want aider reading), use .aiderignore
126# in your repo root — same syntax as .gitignore.
127# See: https://aider.chat/docs/config/aiderignore.html
128
129# --- Environment Variables (not set here, but good to know) ---
130# ANTHROPIC_API_KEY — for Claude models
131# OPENAI_API_KEY — for OpenAI models
132# OPENROUTER_API_KEY — for OpenRouter (access all models with one key)
133# AIDER_MODEL — override model from CLI without editing this file
134