// 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--path=
.aider.conf.yml
// File Content
.aider.conf.yml
1# =============================================================================2# .aider.conf.yml — Opinionated Defaults3# Drop this in your repo root. Override per-project as needed.4# Docs: https://aider.chat/docs/config/aider_conf.html5# =============================================================================67# --- Model Configuration ---89# 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-2025051412# model: openai/o3 # Strong at multi-file architectural changes13# model: anthropic/claude-opus-4-20250514 # Best quality, 5x cost — use for hard problems14# model: deepseek/deepseek-chat # Budget option, surprisingly capable1516# 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-202410221920# 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-202505142324# --- Edit Format ---2526# "diff" is the default for most models and balances token efficiency with27# reliability. Use "whole" if you see malformed diffs on smaller models.28edit-format: diff29# edit-format: whole # More tokens but never breaks — good for weaker models30# edit-format: udiff # Unified diff — works well with OpenAI models3132# Architect mode: one model plans, another edits. Adds a round-trip but33# catches more design issues. Uncomment for complex projects.34# architect: true3536# --- Git & Commit Behavior ---3738# Auto-commit every successful edit. This is the killer feature — gives you39# granular undo via git. Disable only if you want to batch changes manually.40auto-commits: true4142# 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: false4546# Aider's commit messages are good enough. Prefix them so you can filter47# in git log (e.g., `git log --grep="^aider:"`).48attribute-commit-message-author: false49attribute-commit-message-committer: false5051# --- Lint & Test Integration ---5253# 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 ." # Python56# lint-cmd: "eslint --fix ." # JavaScript/TypeScript57# lint-cmd: "cargo clippy -- -D warnings" # Rust5859# 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 failure62# test-cmd: "npm test" # Node.js63# test-cmd: "cargo test" # Rust6465# 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: true68auto-test: false6970# --- Context & Performance ---7172# 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: 204875map-refresh: auto7677# Limit chat history to keep context focused. Raise for long refactoring78# sessions, lower if you hit token limits on smaller models.79max-chat-history-tokens: 40968081# Cache prompts to cut costs and latency on providers that support it82# (Anthropic prompt caching, OpenAI). No downside to enabling this.83cache-prompts: true8485# Stream responses for faster perceived latency. Disable if you're86# piping output or running in CI.87stream: true8889# --- Safety & Workflow ---9091# Show diffs before applying. Turning this off speeds up the flow but92# means you trust aider's changes sight-unseen. Keep on until you're comfortable.93show-diffs: true9495# Don't suggest running shell commands without asking. Safety net against96# aider running `rm -rf` or installing packages without your OK.97suggest-shell-commands: true9899# Max number of files to auto-add to the chat when aider detects they're100# relevant. 15 is generous but keeps context manageable. Set to 0 to always101# be asked before adding files.102auto-add: 15103104# Subtree-only mode: restrict aider to files under the current directory.105# Useful in monorepos to avoid accidentally editing sibling packages.106subtree-only: false107108# --- Input & Output ---109110# Pretty output with colors. Disable for CI/non-interactive use.111pretty: true112113# Dark mode optimized colors (most terminals are dark).114dark-mode: true115116# Disable the telemetry/analytics if you care about that.117analytics: false118119# Vim keybindings in the chat input. Uncomment if you're a vim user.120# vim: true121122# --- Files to Ignore ---123124# Aider respects .gitignore automatically. For additional ignores125# (e.g., generated files you don't want aider reading), use .aiderignore126# in your repo root — same syntax as .gitignore.127# See: https://aider.chat/docs/config/aiderignore.html128129# --- Environment Variables (not set here, but good to know) ---130# ANTHROPIC_API_KEY — for Claude models131# OPENAI_API_KEY — for OpenAI models132# OPENROUTER_API_KEY — for OpenRouter (access all models with one key)133# AIDER_MODEL — override model from CLI without editing this file134