Skip to the content.

aider is AI pair programming in your terminal

Aider is a command line tool that lets you pair program with LLMs, to edit code stored in your local git repository. Aider will directly edit the code in your local source files, and git commit the changes with sensible commit messages. You can start a new project or work with an existing git repo. Aider is unique in that it lets you ask for changes to pre-existing, larger codebases. Aider works well with GPT-4o, Claude 3 Opus, GPT-3.5 and supports connecting to almost any LLM.

aider screencast

Getting started

See the installation instructions for more details, but you can get started quickly like this:

$ pip install aider-chat

# To work with GPT-4o
$ export OPENAI_API_KEY=your-key-goes-here
$ aider 

# To work with Claude 3 Opus:
$ export ANTHROPIC_API_KEY=your-key-goes-here
$ aider --opus



Run aider with the source code files you want to edit. These files will be “added to the chat session”, so that the LLM can see their contents and edit them according to your instructions.

aider <file1> <file2> ...

Be selective, and just add the files that the LLM will need to edit. If you add a bunch of unrelated files, the LLM can get overwhelmed and confused (and it costs more tokens). Aider will automatically share snippets from other, related files with the LLM so it can understand the rest of your code base.

You can also just launch aider anywhere in a git repo without naming files on the command line. It will discover all the files in the repo. You can then add and remove individual files in the chat session with the /add and /drop chat commands described below. If you or the LLM mention any of the repo’s filenames in the conversation, aider will ask if you’d like to add them to the chat.

Aider also has many other options which can be set with command line switches, environment variables or via a configuration file. See aider --help for details.

In-chat commands

Aider supports commands from within the chat, which all start with /. Here are some of the most useful in-chat commands:

See the full command docs for more information.


Example chat transcripts

The example transcripts page shows how you can chat with aider to write and edit code.


See the installation instructions.


For more information, see the FAQ.

Kind words from users