Aider is the OG terminal-native AI pair programmer — Apache-2.0, runs on Python, mapped your repo for context long before “agentic loops” became the marketing term, and commits its own changes to git by default. The latest release is v0.86.0 (2025-08-09); the project is in maintenance mode but still functions. This article shows the install path that works on Ubuntu in 2026, the day-one workflow, and the configuration patterns.

Install on Ubuntu 22.04 / 24.04

The canonical Aider install uses aider-install, a uv-based wrapper that handles Python 3.12 isolation (Aider doesn’t yet support 3.13):

Bash
curl -LsSf https://astral.sh/uv/install.sh | sh
. ~/.local/bin/env

uv tool install aider-install
aider-install

This gives you an isolated aider-chat tool environment using Python 3.12 — no fight with system Python. Verify:

Bash
aider --version

The simpler-but-deprecated path is pipx install aider-chat. If you want stable production behaviour, use aider-install — the project itself recommends it.

Pick a model

Aider is BYOK; it works with any OpenAI-compatible API:

Bash
export ANTHROPIC_API_KEY=***  # Anthropic (Claude Sonnet/Haiku)
export OPENAI_API_KEY=***      # OpenAI
export GEMINI_API_KEY=***      # Google Gemini
export DEEPSEEK_API_KEY=***    # DeepSeek
ollama serve &

Aider remembers your model across sessions in ~/.aider.conf.yml. If you skip the config file, it asks on first run.

The auto-commit workflow

This is what makes Aider different from Claude Code, OpenCode, and friends. By default Aider stages and commits each turn as a separate git commit, with a commit message it writes itself. That’s both the superpower and the footgun.

A productive first hour:

Bash
cd ~/work/my-app
aider app/api/users.py tests/test_users.py

Pass specific files as positional arguments. Aider will:

  1. Map the repo and read the named files into context.
  2. Show you the proposed diff for the next instruction.
  3. Apply the edit, run git add, and commit with a context-aware message.

If you want to back out a session, every commit is its own revert point. If you don’t want auto-commit, aider --no-auto-commits opts out.

Useful flags worth knowing

  • --model claude-sonnet-4-2026 — pick model per session
  • --no-auto-commits — disable auto-commit
  • --no-stream — see the full proposed diff before accepting
  • --map-tokens 1024 — adjust the repo-map size (lower for tight contexts)
  • --edit-format diff — see diffs instead of whole-file rewrites
  • --weak-model <cheap-model> — use a smaller model for grep-style subtasks

A ~/.aider.conf.yml example:

Yaml
model: claude-sonnet-4-2026
weak-model: claude-haiku-3-5-2026
auto-commits: true
edit-format: diff
map-tokens: 1024

Strengths that haven’t gone away

Aider’s repo-map is mature — it understands large Python and JS monorepos better than most competitors. Its commit-message quality is genuinely good (because it sees the diff and the rest of the repo). Its multi-file editing with --files lists is the cleanest in the field.

Where to push back on Aider today

Maintenance-mode flags: the project hasn’t shipped a major version in roughly a year. The core still works — commits, diffs, repo map, LSP-aware lint hooks — but the agentic-loop UX (plan-first, MCP servers, runtime subagents) is missing. If you want those, OpenCode or Claude Code is the better pick in 2026.

Aider is best kept as a “diff-and-commit fast lane” for issues where you know exactly what the change should be. For exploratory multi-file refactors you’ll want a planning agent upstream.

Pairing patterns

Aider + git + pre-commit hooks work well together. The hooks run after Aider’s commit, so any stale imports or lint failures surface immediately. Aider also plays nicely with act and CI: push Aider’s commits, let the CI catch real errors.

Last modified: 2026年7月15日

Author

Comments

Write a Reply or Comment

Your email address will not be published.