Step-by-step instructions
- 1
Step
Verify Python and pip
Aider is a Python package. If you get 'command not found', download Python from python.org before continuing.
python3 --version pip --version - 2
Step
Install Aider via pip
If you get an 'externally-managed-environment' error on macOS, run `pipx install aider-chat` instead.
pip install aider-chat - 3
Step
Set your API Key
To use GPT-4o instead, use `export OPENAI_API_KEY=your-key`.
export ANTHROPIC_API_KEY=your_key_here - 4
Step
Launch Aider
Aider requires your project to be a Git repository. If it's not, run `git init` first.
cd your-project-folder aider
Why this matters
Aider is a leading AI pair programming CLI that lets you edit multiple files simultaneously right from your terminal. Unlike browser-based LLMs where you have to copy-paste code, Aider integrates directly into your Git workflow, executing changes automatically and writing detailed commit messages on your behalf. Setting it up locally gives you maximum flexibility over which AI model you use.
Troubleshooting
- 'externally-managed-environment' on macOS: Modern macOS versions block global pip installs. Instead of using
pip, install pipx using Homebrew (brew install pipx), runpipx ensurepath, and then install Aider viapipx install aider-chat. - 'aider is not recognized' on Windows: If you installed Aider but Windows can't find it, your Python Scripts folder isn't in your PATH. Search for 'Environment Variables', edit PATH, and add
%USERPROFILE%\AppData\Local\Programs\Python\Python312\Scripts(adjusting for your version). - No Git repository error: Aider is designed to track its own changes using Git. If you run
aiderin an empty folder, it will prompt you. Simply rungit initto initialize the repository before starting your coding session.
FAQ
Why do I get 'command not found: aider' after installing?
This usually means the directory where pip installed the executable is not in your system's PATH variable. You either need to add the Python Scripts directory to your PATH or use pipx to manage the installation.
Can I use OpenAI GPT-4o instead of Claude?
Yes. While Claude 3.7 Sonnet is currently the top performer for Aider's benchmarks, you can easily use GPT-4o. Just run export OPENAI_API_KEY=your-key and launch the CLI with aider --model gpt-4o.
Does Aider work in PowerShell?
Absolutely. Once installed via pip, the aider command works in PowerShell, Command Prompt, Windows Terminal, and WSL.
How do I update Aider to the latest version?
If you used pip, run pip install --upgrade aider-chat. If you used pipx, run pipx upgrade aider-chat.
Does Aider send my entire codebase to the API?
No. Aider uses a repository map to understand the architecture, but it only sends the specific files you have "added" to the chat session.
Related tutorials
Microsoft Copilot Studio
Crear un agente de intake de clientes en Microsoft Copilot Studio para negocios de servicios
Crea un agente que cualifica clientes, recoge datos del servicio, guarda el lead y deriva solicitudes urgentes al equipo.
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.