Aider is an AI pair programming tool that allows you to chat with an AI model directly in your terminal, making it easy to edit code in your local git repository. It integrates with various LLM providers (OpenAI, Anthropic, Gemini, OpenRouter, etc.) and supports many programming languages. The current version is 0.86.2, with active development and frequent releases focusing on new model support and user experience improvements.
pip install aider-chatNo compatibility data collected yet for this library.
This quickstart demonstrates how to set up a dummy project with a `main.py` file and a git repository, then launch Aider via the command line. Aider operates interactively in your terminal, acting as an AI pair programmer. You'll need to set an API key for your chosen LLM provider (e.g., OpenAI, Anthropic, Gemini) as an environment variable or pass it via CLI arguments. The example uses a `subprocess.run` call to execute Aider, allowing for direct terminal interaction.
Always explicitly specify your desired model using `aider --model your/model-name ...` to ensure consistent behavior, or regularly check release notes for alias changes.
Ensure the correct API key environment variable for your chosen provider is set before running Aider. Refer to the official Aider documentation for specific provider setup instructions (aider.chat/docs/llms.html).
Use a Python environment manager (e.g., `pyenv`, `conda`, `venv`) to ensure you are running Aider with a compatible Python version (e.g., Python 3.10, 3.11, or 3.12). For example, `python3.12 -m pip install aider-chat`.
Ensure that 'aider-chat' is installed in your environment by running 'pip install aider-chat'. If the issue persists, consider installing 'aider' in an isolated environment using 'pipx' or 'uv' to avoid dependency conflicts. ([aider.chat](https://aider.chat/docs/troubleshooting/imports.html?utm_source=openai))
Verify that 'aider-chat' is installed by running 'pip show aider-chat'. If it's not installed, install it using 'pip install aider-chat'. To prevent package conflicts, consider using 'pipx' or 'uv' for installation. ([aider.chat](https://aider.chat/docs/troubleshooting/imports.html?utm_source=openai))
Install the 'litellm' module by running 'pip install litellm'. To ensure all dependencies are correctly installed, it's recommended to install 'aider' in an isolated environment using 'pipx' or 'uv'. ([aider.chat](https://aider.chat/docs/troubleshooting/imports.html?utm_source=openai))
Install the 'openai' module by running 'pip install openai'. To avoid dependency issues, consider installing 'aider' in an isolated environment using 'pipx' or 'uv'. ([aider.chat](https://aider.chat/docs/troubleshooting/imports.html?utm_source=openai))
Install the 'pyperclip' module by running 'pip install pyperclip'. To ensure all dependencies are correctly installed, it's recommended to install 'aider' in an isolated environment using 'pipx' or 'uv'. ([aider.chat](https://aider.chat/docs/troubleshooting/imports.html?utm_source=openai))
No dependency data recorded yet.