Aider Deep Dive
The dominant FOSS terminal-based AI pair programmer — diff edits, architect mode, repo map, local-model friendly.
★ ★ Aider (github.com/Aider-AI/aider, Apache 2.0) is the dominant FOSS terminal-based AI pair programmer in 2026. Started by Paul Gauthier; widely used; works with any OpenAI-compatible model — Ollama, OpenRouter, Anthropic, OpenAI, DeepSeek, Mistral. Diff-based edits with human-in-loop review. Repo-map for codebase awareness. Architect / Editor mode for splitting reasoning and execution.
If you're shopping for ★ ★ "the local-model agentic coding pick," this is the answer. See agentic coding overview, coding models, hardware tiers.
What Aider is
- ★ Terminal-based. Run
aiderin your project directory; chat with the model about code. - ★ Diff-based edits. The model produces search/replace blocks; Aider applies them. You review every diff before commit.
- ★ Auto-commits to git. Each accepted change is a commit. Easy revert.
- ★ Repo map. Aider sends a tree-sitter-derived skeleton of your codebase as context, so the model knows what exists without reading every file.
- ★ Voice mode. Whisper-based dictation for hands-free coding.
- ★ Architect mode. Reasoning model (e.g., R1) plans; faster code model executes.
- ★ Multi-file edits. One prompt can edit several files coherently.
- ★ Test integration.
--test-cmd "pytest"runs your tests after each edit; the model sees failures and fixes. - ★ Linter integration. Same idea with lint output.
- License: Apache 2.0.
Quick start
Modes
Code (default)
- Direct edits via search/replace blocks.
- Pair-programming-style turn-by-turn.
Architect
- The architect model reasons / writes a plan in plain prose.
- The editor model translates the plan into actual diffs.
- ★ Big win for hard refactors when you have a smart-but-slow reasoning model and a fast-and-precise code model.
Ask
- Q&A only; no edits proposed.
Help
- Aider documentation and command reference.
Model picks for Aider in May 2026
Pure local (Tier 2+ hardware)
- ★ ★
ollama/qwen2.5-coder:32b— the canonical local Aider model. Q4_K_M handles diff format reliably. - ★
ollama/qwen3:32b-instruct— strong general; good in architect role. - ★
ollama/deepseek-r1-distill-llama:70b— architect mode; strong reasoning.
Hybrid local + API
- Architect:
openrouter/anthropic/claude-sonnet-4.7(or claude-haiku for cheaper). - Editor:
ollama/qwen2.5-coder:32b. - Hard tasks routed to API; routine work stays local.
Pure API
- ★ ★ Claude Sonnet 4.7 (April 2025) — strong all-rounder.
- ★ Claude Opus 4.7 — for the hardest tasks.
- GPT-5 — competitive.
- DeepSeek V3 / R1 via DeepSeek API — cheap, strong, but data goes to DeepSeek.
Repo map
Aider parses your code with tree-sitter and sends a compact "this is what's defined" skeleton to the model. Configurable size:
The repo map is one of Aider's distinguishing features; it makes the model "aware" of what exists without sending every file.
.aider files
.aider.conf.yml— per-project config (model, tests, lint)..aider.model.metadata.json— per-model overrides if needed.CONVENTIONS.md— Aider auto-loads this if present; great place to put coding conventions the model should follow.
Common honest gotchas
- Local models drop diff format sometimes. Q4 of a 7B will fail at this; Q4 of a 32B is usually fine; Q4 of a 70B is reliable. Use 32B+ for serious editing.
- Context window matters. Default Ollama tags are 4K–8K context; increase via Modelfile (
PARAMETER num_ctx 32768) or per-call. - Tests as guardrail.
--test-cmdis the magic ingredient — the model sees failures and fixes. Use it. - Auto-commit can pile up small commits. Use
aider --no-auto-commitsif you prefer to commit yourself. - Long-running sessions. Aider remembers the chat; context grows; eventually you
/clearand start fresh. /voicerequires Whisper. Local Whisper or OpenAI; configurable.
Voice mode
/voicetoggles dictation.- Uses whisper.cpp under the hood, or OpenAI's API.
- Surprisingly natural; "add error handling around the database call" works as well as typing.
Aider vs. Cline vs. Continue
- Aider — terminal, diff-based, repo-map, architect mode. ★ ★ for "I want a pair programmer that works well with local models."
- Cline — VS Code, more autonomous, the model writes whole multi-file changes and runs commands. Excellent with API, less reliable with local 30B.
- Continue.dev — VS Code, less autonomous, predictable; great FIM tab completion.
If you're a terminal-first developer, Aider. If you live in VS Code and want chat-side-panel, Cline or Continue.
Honest budget framing
- Pure local: zero marginal cost beyond electricity (~$10–30/month for a 3090 left running).
- Mixed: $10–50/month in OpenRouter / Anthropic credits at moderate use.
- Pure Claude Sonnet 4.7 API: $30–150/month for serious coding use.
- Claude Code subscription: $200/month for unlimited Sonnet/Opus access — for heavy users this beats per-token API pricing.
For more on this math see cost-cloud-vs-local.
Pick this if…
- One pick for terminal-based AI pair programming with local models: ★ ★ Aider + Qwen2.5-Coder 32B.
- Hard refactors / architectural decisions locally: Architect mode with R1-distill 70B.
- Hybrid: Aider routing to Claude Sonnet via OpenRouter for hard tasks, Qwen2.5-Coder 32B local for routine.
- Voice-driven coding:
/voicemode with Whisper. - You want IDE-side instead of terminal: Cline or Continue.dev.
- You want fully autonomous "go fix this": OpenHands — but plan for less reliability.