Aider — The Complete Guide
Aider in any editor. Claude Code is my primary — Aider is the free backup
Aider is an AI pair-programming CLI written in Python. It supports 200+ models via LiteLLM (Anthropic Claude Sonnet 4.6 / Haiku 4.5 / Opus 4.5, OpenAI GPT-5 / GPT-4.1 / o4-mini, Google Gemini 2.5 Pro / Flash, xAI Grok, 300+ models via OpenRouter, plus local models through Ollama), edits files directly on disk, creates automatic git commits, and includes a smart repo-map powered by tree-sitter that understands your project. On my machine Aider is installed in an isolated environment with separate credentials (not Claude Max) and free models (Qwen 2.5 Coder:free and DeepSeek V3:free via OpenRouter) — a backup for when Claude Max hits its quota or when I want an extra-private session. For you, Aider can be the primary tool: if you don't have Claude Pro/Max, or if you're a privacy-focused developer who needs local-only inference (with Ollama), Aider delivers about 80% of Claude Code's capability for absolutely zero cost.
What this guide covers
Aider — what it is
A terminal tool that edits your files for you and saves everything to git
Aider is an open-source tool from researcher Paul Gauthier — an "AI pair-programmer" that runs inside your terminal window (the black-and-white command-line interface). It's written in Python and connects to an LLM (Large Language Model — like Claude, OpenAI's GPT, or Google's Gemini) to understand what you want and apply the change directly to your code files. Unlike a regular chat where you get back text and have to copy it over by hand — Aider edits the files itself, runs tests on request, and even commits (saves a checkpoint in your project's git history) with a message it writes on its own.
Installation with full isolation from Claude Code
Separate environment + separate credentials — without touching your primary subscription's quota
The most important step for serious Aider use is installing it in isolation — meaning a separate Python environment with API keys that are separate from Claude Code. An API key is a secret code that identifies your account with the AI provider (Anthropic, OpenAI, Google, etc.) and is what you get billed on. On my setup Aider lives in a dedicated folder `/opt/aider/` with an OpenRouter key that is completely separate from my Claude Max account — so working with Aider never dips into the primary tool's quota.
Models — what works best for which use case
Free vs. paid, code-specialized vs. general-purpose
Aider can connect to more than 200 different AI models through a library called LiteLLM (think of it as a "universal adapter" that translates requests for each provider separately). In practice, most developers stick with 5-7 models that cover 95% of their needs. In this section we'll walk through them by category — from the priciest and strongest down to the free alternatives that still do 80% of the work. Choosing well saves a lot of money: you don't want to burn the top model on fixing a typo.
The daily workflow
What to type at each step and the shortcut commands that save hours
Aider comes with about 25 short commands that start with a slash (slash commands) — each one a separate tool that speeds up a common action. If you remember 7-8 of them, your work becomes several times faster. In this section we'll walk through the typical loop that repeats itself in almost every session of mine: from opening Aider inside a project folder all the way to committing a new feature.
Advanced techniques
Automation, CI/CD, voice input, and monorepos
One of Aider's most powerful capabilities is non-interactive mode — a mode where it runs without a chat UI, takes a single command, executes it, and exits. This opens the door to an entire world of automation: automatic runs on every Pull Request, overnight lint fixes across dozens of projects, auto-generated documentation for new code. In this section we'll walk through the advanced techniques that turn Aider into a system rather than just a manual tool.
Aider vs. Claude Code
When each one wins — not a replacement, but a complement
Both are excellent tools, and honestly they don't really compete — they complement each other. The choice depends on context: what the task is, what the budget looks like, whether you need absolute privacy or cloud is fine. My own setup is Claude Code as the primary for serious, day-to-day development and Aider for isolated tasks and for saving against the primary subscription's quota. For you — the choice starts with one question: "Do I have a Claude Max subscription?" If yes, Claude Code leads. If not, Aider takes the stage.

