Skip to content
local:aider

Aider

Open Source

An open-source command-line AI coding assistant with deep Git integration—every change is auto-committed and can be rolled back in one step.

By EZ4Code Team
Visit Official Site

Overview

Aider is currently the most acclaimed command-line AI coding assistant in the open-source world, with over 39k GitHub stars. It is deeply bound to Git repositories: every AI code change is automatically committed, and combined with /undo you can roll back in one step—the workflow is tightly coupled with Git. In 2026 it completed an epic update. For terminal devotees, Aider does the same thing as Claude Code—turning AI into your pair programmer—but Aider is fully open source and can connect to any model.

Core features: fully open source, deep Git integration, auto-commit, /undo rollback, supports any model.

Installation

Aider is installed via pip and requires Python 3.10 or higher. After installation, configure a model API key to start using it.

# Check the Python version (3.10+ required)
python --version

# Install Aider
pip install aider-chat

# Verify the installation
aider --version

We recommend installing inside a virtual environment to avoid dependency conflicts: python -m venv venv && source venv/bin/activate

Basic Usage

Run aider inside a Git repository directory to start an interactive session. Use /add to add files you want to edit, then describe your needs in natural language. Aider auto-commits with git after each change; use /undo to roll back. It supports multiple models including OpenAI, Anthropic, and DeepSeek.

# Configure the API key (OpenAI example)
export OPENAI_API_KEY="sk-your-key"

# Use other models like DeepSeek
export DEEPSEEK_API_KEY="your-key"
aider --model deepseek/deepseek-chat

# Launch inside a Git repository
cd my-project
aider

# Common in-session commands
/add src/auth.py        # Add a file to the edit scope
/drop src/old.py        # Remove a file
/undo                   # Roll back the last AI change
/diff                   # View uncommitted changes
/ask "Explain this function"  # Ask only, no edits

Aider only modifies files you've /add-ed, so it won't touch other code—high safety.

Tips

Aider's Git integration is its biggest selling point: every change is an independent commit, and with git log you can clearly see what the AI did. Use --architect mode (one model plans, another executes) to improve quality on complex tasks. You can persist default models and options in .aider.conf.yml. Connecting to models like DeepSeek is extremely cost-effective.

# Architect mode: separate planning and execution
aider --architect --model claude-sonnet-4 --editor-model deepseek/deepseek-chat

# Persist configuration
cat > .aider.conf.yml <<EOF
model: deepseek/deepseek-chat
auto-commits: true
dark-mode: true
EOF

# Read-only mode (review code)
aider --read src/utils.py --message "Are there any bugs in this code?"

# Run directly from the command line
aider --message "Add type annotations to every function" src/auth.py

Tip: For important branches, back up with git branch first; /undo only rolls back the most recent change—use git reset for multiple rollbacks.

Configuration

Aider is configured through .aider.conf.yml in the project root, CLI flags, and environment variables. Set model API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, DEEPSEEK_API_KEY, etc.) as environment variables. The .aider.conf.yml file persists defaults like model, auto-commits, and dark-mode. Aider builds a repo map automatically so the LLM understands your whole project without you adding every file.

# .aider.conf.yml (project root)
model: deepseek/deepseek-chat
auto-commits: true
dark-mode: true

# API keys (environment variables)
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export DEEPSEEK_API_KEY="..."

# Pick a model per run
aider --model deepseek/deepseek-chat
aider --model claude-sonnet-4

# Architect mode: one model plans, another executes
aider --architect --model claude-sonnet-4 \
  --editor-model deepseek/deepseek-chat

# Disable auto-commit if you prefer manual commits
aider --no-auto-commits

DeepSeek is extremely cost-effective; pair it as the editor model in --architect mode with a strong planner model.

FAQ

Common questions cover model choice, cost, Git integration, the repo map, and architect mode. Aider only modifies files you /add, so other code is safe. Every change is auto-committed, and /undo rolls back the last change. The repo map lets the LLM navigate your project without reading every file.

Q: Which model should I use?
A: DeepSeek is the most cost-effective; Claude Sonnet is stronger for
   complex refactors. Use --architect to combine a strong planner with a
   cheap editor model.

Q: How do I reduce costs?
A: Use DeepSeek for routine edits, scope files with /add, and use /ask
   (no edits) for read-only questions.

Q: How does Git integration work?
A: Every AI change is auto-committed; /undo rolls back the last change.
   For multiple rollbacks use git reset.

Q: What is the repo map?
A: A compact map of your repo so the LLM understands structure without
   reading every file.

Q: Will it edit files I didn't add?
A: No—Aider only modifies files you /add, so other code stays untouched.

For important branches, back up with git branch first; /undo only rolls back the most recent change.

More AI Guides