Aider Configuration

CONVENTIONS.md Guide

Configure Aider, the terminal-based AI pair programmer, with coding conventions. Learn about YAML config, model flexibility, and best practices.

Understanding Aider & CONVENTIONS.md

Aider is an open-source, terminal-based AI pair programmer that works with any LLM — Claude, GPT-4, Gemini, local models, and more. CONVENTIONS.md is Aider's way of loading coding conventions that get forwarded to whatever model you're using.

Unlike tool-specific configs like CLAUDE.md (for Claude Code only), Aider's model-agnostic approach means your conventions work across different LLMs.

Aider's Unique Features

Automatic web scraping, linter/test verification of changes, voice coding, and model flexibility — Aider offers capabilities beyond traditional AI coding assistants.

Loading CONVENTIONS.md

There are several ways to load your conventions file:

Command Line Flag

Terminal
# Load conventions for a single session
aider --read CONVENTIONS.md

# Combine with other options
aider --read CONVENTIONS.md --model claude-3-opus

YAML Config File

.aider.conf.yml
# Single file
read: CONVENTIONS.md

# Multiple files (list format)
read:
  - CONVENTIONS.md
  - anotherfile.txt
  - thirdfile.py

# Or inline format
read: [CONVENTIONS.md, anotherfile.txt]

Aider looks for .aider.conf.yml in your home directory, git repo root, and current directory (files loaded later take priority).

CONVENTIONS.md Format

Use natural language guidelines in Markdown format:

CONVENTIONS.md
# Project Coding Conventions

## Language
- Python 3.11+
- Type hints required on all functions
- Use f-strings for string formatting

## Style
- Follow PEP 8
- Max line length: 88 (Black default)
- Use pathlib over os.path
- Prefer dataclasses for data structures

## Testing
- Use pytest for all tests
- Aim for 80% coverage
- Mock external services
- Use fixtures for repeated setup

## Documentation
- Google-style docstrings
- README for each module
- Update CHANGELOG for releases

## Git
- Conventional commits
- Squash merge to main
- Reference issue numbers

Full .aider.conf.yml Example

.aider.conf.yml
# Model configuration
model: claude-3-5-sonnet-20241022

# Files to read for context
read:
  - CONVENTIONS.md
  - docs/architecture.md

# Auto-commits
auto-commits: true

# Lint command (run after changes)
lint-cmd: ruff check --fix

# Test command (verify changes)
test-cmd: pytest

# Editor mode
edit-format: diff

# Git options
gitignore: true
attribute-author: true

Best Practices

  • Keep conventions focused — Don't overload with generic advice
  • Include lint/test commands — Aider can verify changes automatically
  • Use the YAML config — More powerful than command-line flags
  • Commit conventions to git — Share with your team
  • Try different models — Aider makes switching easy

Related Guides

CLAUDE.mdCLAUDE.md GuideGEMINI.mdGEMINI.md GuideComparisonCompare All Tools

Frequently Asked Questions

Manage Your CONVENTIONS.md Files Visually

ClaudeMDEditor lets you browse, edit, and organize CONVENTIONS.md files across all your projects. Plus it handles CLAUDE.md, .cursorrules, and more.

Claude CodeCursorCopilotWindsurfGeminiCodexAider
Get ClaudeMDEditor — $13

One-time purchase for macOS Tahoe (26+)