Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 7, 2026·4 min de lecture

.aider.conf.yml — Production Aider Configuration

Drop-in `.aider.conf.yml` template with project Aider settings — auto-test, lint, model split, file ignores. Production-tested from 36K-star community.

Aider
Aider · Community
Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Needs Confirmation · 66/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : New
Point d'entrée
Asset
Commande CLI universelle
npx tokrepo install 553b65cc-501c-4012-97d9-ed08ca3c6415
Introduction

.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: 8000

Per-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: true

With 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.


Quick Use

  1. Copy the YAML below to your repo root as .aider.conf.yml
  2. Adjust test-cmd and lint-cmd to your project's commands
  3. 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: 8000

Per-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: true

With 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+

🙏

Source et remerciements

Pattern derived from Aider documentation. Licensed under Apache-2.0.

Aider-AI/aider — ⭐ 36,000+

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires