What is Aider?
Aider is a terminal-based AI pair programmer. It maps your entire repo into context, lets you ask for changes in natural language, and applies multi-file edits directly to your working tree — with automatic git commits for easy review and undo.
Answer-Ready: Aider is a CLI AI pair programmer that edits code across multiple files in your local git repo, supporting Claude, GPT-4o, and other models with automatic git commits.
Core Features
1. Whole-Repo Context
Aider builds a repo map so the AI understands your project structure:
aider --model claude-sonnet-4-20250514
> /add src/api/*.py # Add specific files to context
> refactor the auth middleware to use JWT2. Multi-File Edits
One prompt can modify multiple files simultaneously:
> add a /health endpoint with tests
# Aider edits: src/routes/health.py, tests/test_health.py, src/app.py3. Auto Git Commits
Every change is committed with a descriptive message:
git log --oneline
a3f2b1c Add /health endpoint with unit tests
9e1d4a7 Refactor auth middleware to use JWT tokens4. Model Flexibility
aider --model gpt-4o # OpenAI
aider --model claude-sonnet-4-20250514 # Anthropic
aider --model deepseek/deepseek-chat # DeepSeek
aider --model ollama/llama3 # Local via Ollama5. Architect Mode
Use a strong model for planning, cheaper model for coding:
aider --model claude-sonnet-4-20250514 --architectKey Commands
| Command | Action |
|---|---|
/add file |
Add file to context |
/drop file |
Remove file from context |
/diff |
Show pending changes |
/undo |
Undo last AI edit |
/run cmd |
Run a shell command |
/test |
Run tests |
FAQ
Q: How does it compare to Claude Code? A: Aider focuses on chat-driven edits with auto-commits. Claude Code offers broader tool use (bash, web, MCP). They complement each other well.
Q: Does it support Claude? A: Yes, Claude Sonnet and Opus are first-class supported models.
Q: Can it handle large repos? A: Yes, the repo-map feature intelligently selects relevant context without exceeding token limits.