Skip to the content.

Installing aider

Optional steps:

pip install aider-chat

Install the “aider-chat” package with pip from one of these sources, using python 3.9-3.11:

On Windows, you may need to run py -m pip install ... to install python packages.

Provide your OpenAI API key

You need a paid API key from OpenAI to use aider. Note that this is different than being a “ChatGPT Plus” subscriber.

You can place your api key in an environment variable:

Or you can create a .aider.conf.yml file in your home directory. Put a line in it like this to specify your api key:

openai-api-key: sk-...

Or you can provide your key as a command line argument:

aider --openai-api-key sk-...

Install git

Make sure you have git installed and available on your shell path. Here are instructions for installing git in various environments.

You are done!

See the usage instructions to start coding with aider.

The rest of the install steps are completely optional.


Install PortAudio (optional)

Aider supports coding with your voice using the in-chat /voice command. Aider uses the PortAudio library to capture audio. Installing PortAudio is completely optional, but can usually be accomplished like this:

Add aider to your editor (optional)

NeoVim

joshuavial provided a NeoVim plugin for aider:

https://github.com/joshuavial/aider.nvim

VS Code

joshuavial also confirmed that aider works inside a VS Code terminal window. Aider detects if it is running inside VSCode and turns off pretty/color output, since the VSCode terminal doesn’t seem to support it well.

MattFlower provided a VSCode plugin for aider:

https://marketplace.visualstudio.com/items?itemName=MattFlower.aider

Other editors

If you are interested in creating an aider plugin for your favorite editor, please let me know by opening a GitHub issue.