Coding agent
Aider AI Pair Programmer for Git Repositories
Aider is an open-source, terminal-first AI pair programmer that edits files inside an existing Git repository, records changes in Git, maps the wider codebase for context, and works with hosted or local language models.
Intermediate · CLI tool installed via pip; runs in any terminal alongside a local git repository with no IDE dependency
Editorial review
Tool categories, pricing, source status, deployment options, and product claims can change quickly. Verify the official source before production or commercial use.
OpenSourcesAI verdict
Aider is one of the strongest coding agents for developers who want AI assistance to behave like a disciplined Git collaborator rather than a visual autonomous IDE. Its repository map, reversible commit history, model independence, and focused terminal workflow make it especially effective for scoped fixes and multi-file refactors. It is less suitable for users who need a highly visual approval interface or who are not comfortable reviewing Git history, test output, and model-generated changes.
Best for
Developers who are comfortable in a terminal and want model-agnostic AI coding with direct file edits, automatic Git history, explicit context control, and the ability to use premium APIs, self-hosted endpoints, Ollama, or LM Studio without changing editors.
Why use it
Use Aider when you want an AI coding assistant that works inside the repository you already have instead of moving the project into a proprietary editor. Aider can discuss a change before editing, apply targeted updates across several files, run lint or test feedback, and leave each completed step in reviewable Git history. That combination makes it easier to inspect, reverse, branch, and integrate AI-assisted work using normal engineering practices.
How Aider actually works
Aider runs from the root of an existing project and works directly with files in that Git repository. You can start with specific files, add or remove files during the session, ask questions without editing, or request a code change. Aider sends the selected file contents plus a compact repository map to the chosen model, interprets the model’s edit instructions, writes the changes, and reports the result in the terminal.
The repository map is important because it gives the model structural awareness beyond the files explicitly placed in the chat. It summarizes relevant files and key symbols, including critical definition lines and call signatures, so a change in one module can account for abstractions elsewhere. It is not the same as uploading the entire repository on every request, and developers still need to manage which full files belong in active context.
Aider is terminal-first rather than terminal-only. Its documentation also supports browser operation, file-watch workflows from an IDE or editor, image and web-page context, voice input, coding-convention files, and copy-and-paste workflows with model web chats. The terminal remains the primary control surface and Git remains the primary review surface.
Git workflow, commits, and rollback behavior
By default, Aider commits each completed AI edit with a descriptive message. If a file already contains uncommitted work, Aider normally commits those dirty changes first so the developer’s existing work remains separate from the AI-generated edit. This is safer than silently mixing both changes, but it can surprise users who expect their working tree to remain uncommitted.
The /diff command shows changes since the previous message, while /undo reverses the latest Aider change. Developers can also inspect, amend, rebase, or revert commits with ordinary Git tools. Automatic commits can be disabled with --no-auto-commits, dirty-file commits can be disabled with --no-dirty-commits, and all Git integration can be disabled with --no-git when another backup and review process is in place.
Aider skips Git commit verification hooks by default when creating its automatic commits. Teams that depend on pre-commit verification should enable --git-commit-verify or run the project’s real validation commands independently before accepting or merging the work. A successful Aider edit is not equivalent to a successful CI run.
Chat modes and model roles
- Code mode: the default implementation mode. Aider interprets the request and edits the repository files.
- Ask mode: discusses the code, investigates options, and develops a plan without changing files. A practical workflow is to agree on the approach in ask mode, then switch to code mode.
- Architect mode: sends the task to a main architect model, then sends the proposed solution to an editor model that converts it into file edits. This adds a second model request, increasing latency and usually cost, but can improve complex changes or pair a strong reasoning model with a more reliable editing model.
- Help mode: answers questions about Aider configuration, commands, models, and troubleshooting using Aider’s own indexed documentation.
Model choice and local-model reality
Aider can connect to most major model providers and to local or self-hosted endpoints. That flexibility is valuable, but provider compatibility does not guarantee editing reliability. Coding agents need models that can follow an edit format precisely, preserve surrounding code, and reason across several files. A weaker model may generate plausible code in chat while failing to produce edits that Aider can apply safely.
For Ollama, Aider’s documentation recommends the ollama_chat provider form. Context length needs careful attention because a local runtime can silently discard material that exceeds its configured window. Aider attempts to request enough context for the current exchange, but developers should still verify the model, quantization, available memory, and runtime settings before trusting large-repository work.
LM Studio can expose a local OpenAI-compatible endpoint that Aider can call. Local models keep inference under the operator’s control, but the source code still enters the selected model’s context and may be retained in local logs or surrounding tools. Hosted models generally provide stronger editing reliability, while local models trade capability and speed for privacy, control, and predictable infrastructure.
Installation and a safe first-session path
- Prefer an isolated installation through aider-install, uv, or pipx. Direct pip installation is supported, but Aider recommends a virtual environment so pinned Python dependencies do not interfere with the project environment.
- Open a terminal in a clean Git branch and confirm that existing work is committed or intentionally separated before launching Aider.
- Start with one narrowly scoped request and only the files needed for that task. Use ask mode first when the architecture or expected behavior is unclear.
- Review the generated diff and commit history, run the repository’s actual lint, unit, integration, and build checks, and inspect any tests Aider added rather than assuming generated assertions are correct.
- Use /undo or Git revert when the result is wrong. Do not keep prompting over a flawed foundation until the diff becomes too large to review confidently.
Where Aider fits among coding agents
Aider is strongest when the developer wants to keep their current editor, terminal, repository structure, and Git workflow. It provides more direct repository control than a chat-only assistant and less visual ceremony than an IDE agent that asks for approval before every action.
Cline is a better fit when the main requirement is a visual VS Code agent with per-action approvals, terminal execution, and MCP tools. Continue is stronger for teams that want IDE chat, autocomplete, and source-controlled assistant configuration across VS Code and JetBrains. OpenCode is a closer terminal-native alternative for developers comparing newer agent interfaces and autonomous workflows.
Key features
- Git-native editing with descriptive automatic commits, /diff review, /undo rollback, and branch-friendly history management.
- A concise repository map that exposes important files, symbols, signatures, and definition lines without placing the entire repository in the prompt.
- Code, ask, architect, and help chat modes for separating investigation, implementation, two-model planning, and Aider troubleshooting.
- Broad model connectivity through hosted providers, local Ollama models, LM Studio, and OpenAI-compatible endpoints.
- Automatic linting and optional test commands that can feed failures back into the coding loop for repair attempts.
- Terminal-first operation with optional browser use, IDE file-watch workflows, images, web-page context, coding conventions, and prompt caching.
Common AI use cases
- Implement a scoped bug fix and leave the result in a reviewable Git commit.
- Refactor several related files while preserving existing project abstractions.
- Add or update unit tests around a defined behavior change.
- Investigate a repository in ask mode before authorizing implementation.
- Use an architect model to plan a complex change and a separate editor model to apply it.
- Maintain a codebase over SSH, in a remote terminal, or without changing the team’s preferred IDE.
- Connect a private local model for code that should not be sent to a hosted model provider.
Business use cases
- Small engineering teams can accelerate repetitive maintenance while retaining normal pull-request and Git review practices.
- Consultants can work inside client repositories without requiring the client to adopt a specific AI-native editor.
- Open-source maintainers can draft focused fixes, tests, migrations, and documentation updates on isolated branches.
- Teams can compare hosted and self-hosted coding models through one consistent terminal workflow.
How AI builders can use it
- Discuss the task in ask mode until the expected behavior, files, and validation plan are clear.
- Create or switch to a dedicated branch before allowing edits.
- Add only the files needed for direct editing and let the repository map provide broader structural context.
- Use code mode for focused implementation or architect mode when a separate planning pass adds value.
- Inspect /diff and the resulting Git commits after every meaningful step.
- Run the repository’s own validation chain outside the model conversation before opening or updating a pull request.
Who should use it
- Developers comfortable with terminals, branches, diffs, commits, and test output.
- Teams that want AI assistance without standardizing on a proprietary editor.
- Engineers who need to switch among cloud APIs, self-hosted endpoints, and local models.
- Developers performing scoped multi-file fixes, refactors, test additions, and repository maintenance.
- Users who value reversible Git history more than a visual inline approval interface.
Who should not use it
- Beginners who are not yet comfortable identifying, reviewing, and reversing Git changes.
- Users who want a visual click-to-approve IDE workflow for every file and terminal action.
- Teams expecting a coding agent to run long autonomous tasks without active review or validation.
- Repositories without a dependable test, lint, build, or manual verification process.
- Sensitive codebases whose provider, endpoint, logging, and retention policies have not been reviewed.
Evaluation checklist
- Does the team prefer terminal and Git review or a visual IDE approval workflow?
- Which model can reliably produce Aider-compatible edits for the languages and repository size involved?
- Will source code be sent to a hosted provider, a self-hosted endpoint, or a local runtime?
- How will context be managed in a large monorepo?
- Should automatic commits and dirty-file commits remain enabled?
- Do pre-commit hooks need --git-commit-verify, or will validation run separately?
- Which lint, test, build, and manual checks define an acceptable change?
- How will API keys, local endpoint access, logs, and model-provider retention be controlled?
Security and admin notes
- Treat source code, prompts, terminal output, stack traces, configuration files, and pasted web content as data sent to the selected model endpoint.
- Keep secret files and generated credentials outside the chat scope, and use .aiderignore plus normal repository ignore controls where appropriate.
- Review hosted-provider retention and training terms before sending proprietary or regulated code.
- Bind local Ollama or LM Studio endpoints to trusted interfaces and require authentication when exposing them beyond the local machine.
- Run AI-assisted changes on isolated branches with independent code review and CI before production deployment.
Pricing notes
Aider is open-source software. The meaningful operating cost comes from the selected model provider, token volume, context size, and the use of architect mode, which adds a second model request. Local models avoid per-token API billing but require suitable hardware, electricity, runtime maintenance, and enough model capability to produce reliable edits.
Tradeoffs
Aider provides unusually strong Git control and model flexibility, but that control assumes an engaged developer. Large repositories still require context discipline; weak or undersized models can fail at edit formatting or reasoning; architect mode adds latency and cost; and automatic commits can be surprising until the Git behavior is understood. Its terminal-first review experience is efficient for experienced developers but less approachable than visual IDE agents.
Recommended workflow
- Start from an isolated branch with a clean understanding of any preexisting dirty files.
- Use ask mode to define the desired behavior and validation plan before editing.
- Keep the first request small enough to review in one diff.
- Inspect /diff and the Git commit after each meaningful change.
- Run the project’s real lint, tests, build, and manual checks outside the chat.
- Undo or revert incorrect work instead of stacking more prompts on top of a flawed change.
- Open a normal pull request and require human review before merging.
Pros
- Excellent Git integration with reversible, inspectable change history.
- Works with existing editors and repository workflows instead of requiring an AI-specific IDE.
- Model-agnostic across hosted, self-hosted, and local endpoints.
- Repository map gives efficient structural context for multi-file work.
- Ask, code, and architect modes support deliberate planning before implementation.
Cons
- Requires Git and terminal confidence to use safely and efficiently.
- Local-model quality varies widely and can make edits unreliable.
- No primary visual inline-diff approval workflow comparable to VS Code-native agents.
- Automatic dirty-file and AI commits can surprise users who have not reviewed the defaults.
- The developer still owns validation, security review, and production correctness.
Alternatives
- Cline may be better when you want a visual VS Code agent with explicit action approvals and MCP tool use.
- Continue may be better when IDE chat, autocomplete, and team-controlled configuration are the priority.
- OpenCode may be better when you want to compare newer terminal-native autonomous agent workflows.
- Cursor may be better when a polished commercial AI-first editor and inline assistance matter more than model independence.
FAQ
Does Aider automatically commit its changes?
Yes, automatic commits are enabled by default. Aider also normally commits preexisting dirty changes before editing those files so the user’s work stays separate. Both behaviors can be disabled, and /diff, /undo, and ordinary Git commands remain available.
Is Aider only a terminal application?
The terminal is its primary interface, but Aider also documents browser operation, IDE file-watch workflows, image and web-page context, voice input, and copy-and-paste workflows with model web chats.
Can Aider use Ollama or LM Studio?
Yes. Aider supports local Ollama models, LM Studio endpoints, and other OpenAI-compatible APIs. Editing quality depends heavily on the selected model and context configuration, so local support does not guarantee reliable results on complex repositories.
What is architect mode?
Architect mode uses a main model to propose the solution and an editor model to translate that proposal into file edits. The extra request can improve difficult tasks, but it also increases latency and usually raises model cost.
Does the repository map send the entire repository?
No. The map is a concise structural summary of files and important symbols. Full contents are supplied for files added to the active chat, while the map helps the model understand how those files relate to the wider project.
Does Aider replace code review and CI?
No. Aider can lint, run configured tests, and attempt repairs, but developers should still inspect the diff, review generated tests, run the repository’s complete validation chain, and use an ordinary pull-request review process.
Official verification sources
Direct official links used to verify pricing, features, security claims, and product packaging.
OpenSourcesAI ecosystem connections
Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.
Alternative solutions
Guides, comparisons, and resources
Directory paths