Aider Chat

Aider is an AI-powered command-line chat tool designed for pair programming with GPT-3.5/GPT-4. It allows developers to edit code stored in...

Last verified:

Visit Aider Chat

What is Aider Chat?

Aider is AI pair programming in your terminal that lets you collaborate with large language models (LLMs) to start new projects or build on existing codebases. It connects directly to your local Git repository, editing code in place and automatically committing changes with sensible commit messages. This terminal-based tool supports 100+ programming languages including Python, JavaScript, Rust, Ruby, Go, C++, PHP, HTML, and CSS.

Key features include automatic Git integration that tracks every change with commits, a codebase mapping system that helps it work well on larger projects, and support for both cloud and local LLMs. Aider can connect to almost any LLM including Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini, GPT-4o, and local models. It automatically lints and tests code after changes, fixing problems detected by your linters and test suites.

Aider is designed for developers who want AI assistance directly in their terminal workflow. It integrates with favorite IDEs/editors, supports voice-to-code for speaking requests about features/test cases/bug fixes, and allows adding images and web pages to chats for visual context. Users can copy/paste between aider and web chat interfaces, and the tool has achieved 44K GitHub stars with 6.8M installs.

The tool builds a concise repository map of important classes, functions, and relationships across projects to give models richer code context, improving behavior on larger codebases. It shows Git diffs for all changes, making them easy to review, branch, and roll back using familiar Git tools.

Aider Chat pricing

Pricing model: Free

Aider is open source software available under an Apache 2.0 license and is free to use. The tool itself has no subscription fee. However, users need to pay for LLM API usage separately when connecting to cloud models like Claude 3.7 Sonnet, DeepSeek, OpenAI o1/o3-mini, or GPT-4o. Users can avoid API costs by using local LLM models. The website shows 15B tokens/week usage and 88% Singularity metric across the user base.

Aider Chat pros

  • Automatically commits changes with sensible Git commit messages
  • Works with 100+ programming languages
  • Supports Claude 3.7 Sonnet, DeepSeek R1, OpenAI o1/o3-mini, GPT-4o
  • Connects to local LLM models
  • Builds codebase map for better performance on large projects
  • Automatically lints and tests code after changes
  • Voice-to-code feature for speaking requests
  • Integrates with favorite IDEs and editors
  • Can add images and web pages to chat for visual context
  • 44K GitHub stars with 6.8M installs showing strong adoption
  • Supports copy/paste between terminal and web chat
  • /undo command to easily revert AI changes
  • Works in any size repository including monorepos
  • Open source under Apache 2.0 license
  • Can script aide via command line or Python
  • Shows Git diffs for easy review and rollback of changes
  • Registro de chat history saved in .aider.chat.history.md

Aider Chat cons

  • Not optimized for quick performance in very large repos
  • Weaker LLM models get overwhelmed by repository map content
  • Repository map disabled by default for weaker models
  • Only works with one Git repo at a time
  • LLMs sometimes speak unexpected languages despite prompts
  • Code highlighting may stop when markdown files with triple backticks added
  • Adding too many files can distract/confuse the LLM
  • Requires API keys for most LLM providers (costs tokens)

Frequently asked questions about Aider Chat

How can I add ALL the files to the chat?

Adding all files is probably not a good idea and will likely do more harm than good. The best approach is to think about which files need to be changed for your task and add just those files. Aider automatically analyzes your entire codebase to build a compact repository map that provides context about the rest of your Git repo. Adding irrelevant files will distract or confuse the LLM, give worse coding results, and increase token costs. If you still wish to add many files, you can use wildcards when launching aider (aider src/*.py), use /add with wildcards, or give /add a directory name to recursively add all files under that directory.

Can I use aider in a large (mono) repo?

Aider will work in any size repo but is not optimized for quick performance and response time in very large repos. To improve performance in monorepos, you can use the --subtree-only switch to tell aider to ignore the repo outside the directory you start in. You can also create a .aiderignore file (conforming to .gitignore syntax) to tell aider to ignore parts of the repo that aren't relevant. For example, you can ignore everything with /* and allow specific directories with !foo/, !bar/, !baz/ patterns.

Can I use aider with multiple git repos at once?

Currently aider can only work with one repo at a time. However, there are workarounds for interrelated repos: you can run aider in repo-A and use /read to add files read-only from repo-B; you can create repo maps with --show-repo-map > map.md in each repo and share them; you can use aider to write documentation about each repo and read those docs; or you can have aider write scripts demonstrating functionality from one repo to use in another.

How do I turn on the repository map?

Depending on the LLM you use, aider may launch with the repo map disabled by default (showing 'Repo-map: disabled'). This is because weaker models get easily overwhelmed and confused by repo map content and may mistakenly try to edit code in the map. The repo map is usually disabled for a good reason. If you want to force it on, you can run aider with --map-tokens 1024 to allocate tokens for the repository map.

How do I include the git history in the context?

When starting a fresh aider session, you can include recent Git history using the /run command with git diff. For example, /run git diff HEAD~1 includes the diff of the last commit in chat history. To include multiple commits, increase the number: /run git diff HEAD~3 shows changes from the last three commits. This is most useful when starting a new session to provide context about recent work. You can also prepare diff output outside aider: git diff -C10 v1..v2 > v1-v2-changes.diff, then aider --read v1-v2-changes.diff.

How can I run aider locally from source code?

To run aider locally from source: clone the repository with git clone [email protected]:Aider-AI/aider.git, navigate to the directory with cd aider, create a virtual environment (recommended), install aider in editable/development mode with python -m pip install -e ., then run the local version with python -m aider. This allows you to run from the latest copy of source files for development or testing.

Can I change the system prompts that aider uses?

The most convenient way to add custom instructions is using a conventions file (like CONVENTIONS.md). Aider supports different system prompts and edit formats modularly in the aider/coders subdirectory. There's a base coder with base prompts plus specific implementations like wholefile_coder.py (used by GPT-3.5, select with --edit-format whole), editblock_coder.py (used by GPT-4o, select with --edit-format diff), and udiff_coder.py (used by GPT-4 Turbo, select with --edit-format udiff). Run with --verbose --no-pretty to see raw LLM communication when experimenting.

What LLMs do you use to build aider?

Aider writes about 70% of its own code in each release. The developer uses multiple LLMs, primarily OpenAI gpt-5.2 (38.8% of tokens), gpt-5.4 (30.6%), gemini/gemini-3-flash-preview (9.5%), gpt-5.2-codex (6.6%), and others. These statistics are extracted from public aider analytics logs. The tool itself supports connecting to almost any LLM including Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini, GPT-4o, and local models.

How are the 'aider wrote xx% of code' stats computed?

Since aider is tightly integrated with Git, all code changes are committed with proper attribution. The stats are computed by running git blame on the repo and counting who wrote all the new lines of code in each release. Only lines in source code files are counted, not documentation or prompt files. This provides accurate attribution of AI-generated code versus human-written code.

Can I share my aider chat transcript?

Yes, you can share aider chat logs prettily. First, copy the markdown logs from .aider.chat.history.md and make a GitHub gist or publish the raw markdown anywhere. Then take the gist URL and append it to https://aider.chat/share/?mdurl= to get a shareable URL like https://aider.chat/share/?mdurl=https://gist.github.com/Aider-AI/2087ab8b64034a078c0a209440ac8be0. This displays the chat history as you'd see it in the terminal.

Categories

Use cases

Browse all AI tools on NeedAnAI