Aider: AI Programming from the Terminal, Open-Source and Multi-Model 
If there’s a tool in the AI coding ecosystem that embodies Unix philosophy 100%, it’s Aider. No GUI, no mandatory monthly subscription, no vendor lock-in. Just you, your terminal, your Git repository, and the AI model you choose. In 2026, Aider has become the favorite tool for a specific category of developers: those who prefer total control.
In this article I explain what Aider is, how to install it, how to configure it with different models (including free local options), and when it makes sense to use it over alternatives like Claude Code or Cursor.
What exactly is Aider?
Aider is an open-source pair programming assistant that runs in your terminal. You install it once, point it to your Git repository, and you can ask it in natural language to modify code, add features, fix bugs, or refactor entire files.
What sets it apart from most similar tools:
- It’s completely model-agnostic: it works with Claude (Anthropic), GPT-4o (OpenAI), Gemini (Google), DeepSeek, and dozens of local models via Ollama or LM Studio.
- Native Git integration: every change Aider makes automatically generates a commit with a descriptive message. Your history stays clean and auditable.
- Understands your entire codebase: it generates an internal map of the repository to understand the project structure, not just the file you have open.
- It’s free as a tool: you only pay for the tokens you consume in the API of the model you choose.
Installation in 5 Minutes
Aider is installed with pip. Make sure you have Python 3.8+ installed.
# Basic installation
pip install aider-chat
# Verify installation
aider --version
To use it with Claude (the most popular configuration in 2026):
# Export your Anthropic API key
export ANTHROPIC_API_KEY=your_api_key_here
# Start Aider in your project
cd my-project
aider
For GPT-4o:
export OPENAI_API_KEY=your_api_key_here
aider --model gpt-4o
For a local model with Ollama (completely free, no internet):
# First install Ollama and download a model
ollama pull deepseek-coder-v2
# Then start Aider pointing to the local server
aider --model ollama/deepseek-coder-v2
Chat modes: when to use each one
Aider has four chat modes that change how it interacts with your code. This is one of the most powerful aspects of the tool and something many users ignore at first.
/code Mode (default)
The model directly edits the files you specify. Ideal for implementing concrete features.
> /add src/auth.py src/models/user.py
> add email validation to the register() method and update the User model to include the email_verified field
/architect Mode
First plans the changes in natural language, then a second model implements them. It’s slower but produces more consistent results for complex changes that touch multiple files.
> /architect
> I need to refactor the authentication system to use JWT instead of sessions. I have the files auth.py, middleware.py and the tests in tests/test_auth.py
/ask Mode
Only answers questions about the code without modifying anything. Perfect for understanding existing code or planning before acting.
> /ask
> What is the current authentication flow and where are there potential vulnerabilities?
/help Mode
Help with using Aider itself.
Real workflow with Git
One of the reasons Aider generates such loyalty is its Git integration. Every change is automatically versioned. If something goes wrong, you simply do git revert.
Example of a typical session:
$ cd my-express-app
$ git status
On branch feature/payments
$ aider src/payments/stripe.js src/routes/checkout.js
Aider v0.62.0
Claude 3.7 Sonnet
Repo map: 47 tokens
Added 2 files to the chat.
> implement the Stripe webhook to confirm payments and update the /checkout/confirm route
# Aider analyzes the files, makes the changes and commits automatically:
# [main 3f8a12c] feat: add Stripe webhook handler and update checkout route
> /diff
# Shows exactly what changed
> the tests fail in webhook_test.js, see why
# Aider reviews, diagnoses and proposes a fix
The result: modified code + clean commits + auditable history. Without needing to leave the terminal.
Multi-model configuration: the killer feature
In 2026 Aider natively supports more than 60 models. This is especially relevant for developers in LatAm, where API costs can be a real consideration.
Cost strategy for LatAm
| Model | Approximate cost | Speed | Quality |
|---|---|---|---|
| Claude 3.7 Sonnet | ~$3-8 USD / 1M tokens | Fast | Excellent |
| GPT-4o Mini | ~$0.15 / 1M tokens | Very fast | Good |
| DeepSeek-V3 (API) | ~$0.27 / 1M tokens | Fast | Excellent |
| Ollama (local) | $0 | Variable | Good |
For large projects, many developers use a hybrid strategy:
- Cheap models (DeepSeek, GPT-4o Mini) for routine tasks
- Claude Sonnet or GPT-4o for complex changes or architecture
- Ollama for long sessions without worrying about costs
To set the default model and save time:
# Create a .aider.conf.yml file in your home directory
echo "model: deepseek/deepseek-chat" > ~/.aider.conf.yml
# Or directly in the project directory for override
echo "model: claude-3-7-sonnet-20250219" > .aider.conf.yml
Pro tips that make the difference
1. Use comments in code as instructions
One of the most original features: you can leave # AI: instruction here comments directly in your code and Aider processes them automatically.
def calculate_discount(price, user_tier):
# AI: implement discount logic: bronze=5%, silver=10%, gold=20%, enterprise=custom
pass
2. Prompt caching for long sessions
Aider supports prompt caching with Claude and GPT, which reduces costs by up to 90% in sessions where the repository context remains stable. It activates automatically.
3. .aiderignore for large projects
Like .gitignore but for Aider. Exclude folders you don’t want it to index:
node_modules/
dist/
.env
*.log
4. Voice mode for voice programming
aider --voice
Yes, you can literally talk to your terminal. Useful for long sessions when your fingers are exhausted.
5. Scripting and automation
Aider can be scripted via command line, which opens possibilities for CI/CD pipelines:
# Run a non-interactive instruction and exit
aider --message "update all tests to cover the new auth module" src/auth.py tests/
# Yes mode to accept all changes automatically
aider --yes --message "fix all linting errors in the src/ directory"
```## When to Use Aider vs. Claude Code vs. Cursor?
This is the question everyone asks. The honest answer:
**Use Aider if:**
- You're a terminal-first developer and uncomfortable with the mouse
- You want total control over which model you use and how much you spend
- Your company can't send code to certain providers (you can use local models)
- You work a lot with large legacy repositories
- You value open-source and want to be able to audit/modify the tool
**Use Claude Code if:**
- You want the best balance between agentic power and terminal experience
- You work with complex projects that require deep reasoning
- Integration with MCP servers is important for your workflow
**Use Cursor if:**
- You prefer a visual IDE experience
- Your team has mixed terminal experience levels
- Real-time collaboration matters
The three aren't mutually exclusive. Many devs in 2026 use Cursor for day-to-day work and Aider for specific massive refactoring tasks or when they're on remote servers via SSH.
---
## The Real Cost Model for LatAm
Aider is free as software. What you pay for are the API tokens.
For a developer using Aider moderately (2-3 hours/day):
- **With Claude 3.7 Sonnet**: ~$15-30/month depending on complexity
- **With DeepSeek-V3**: ~$2-5/month
- **With local Ollama**: $0 (if you have the GPU to run it)
Compared to Cursor Pro ($20/month) or GitHub Copilot Pro ($10/month), Aider can be more economical if you use mid-tier models, and more expensive if you use Claude/GPT-4 for everything. The key is flexibility: **you decide the trade-off between cost and quality**.
---
## Getting Started Today
```bash
# Installation
pip install aider-chat
# First session (with Claude)
export ANTHROPIC_API_KEY=your_key
cd your-project
aider
# Inside Aider, add files and start:
# /add file1.py file2.py
# > describe what you want to do
The official documentation at aider.chat is excellent and covers everything from basic use cases to advanced configurations with local models.
Are you already using Aider in your workflow? Do you combine it with any other AI editor or use it as your main tool? Share your setup in the comments — hybrid workflows are always the most interesting to discuss. ![]()
