Aider is the git-native pair programmer; it edits files and commits each change; and on Windows it’s best run in WSL, where git and the shell behave the way Aider assumes. This guide installs Aider in WSL with pipx, connects it to a cheap model, and covers the WSL details that keep it smooth.
If WSL isn’t installed yet, start with the WSL install guide.
Step 1: Python and pipx in WSL
WSL ships with Python; add pipx to install Aider cleanly in its own environment:
sudo apt update && sudo apt install -y pipx
pipx ensurepath
Reopen the shell so pipx’s bin directory is on your PATH.
Step 2: Install Aider
pipx install aider-chat
aider --version
Step 3: Connect a cheap model
Aider has built-in support for many providers. For DeepSeek, it’s native:
export DEEPSEEK_API_KEY="sk-your-key"
aider --model deepseek/deepseek-v4-flash
For any OpenAI-compatible endpoint (Qwen, Kimi, GLM via their OpenAI URLs), set the base URL:
export OPENAI_API_BASE="https://api.moonshot.ai/v1"
export OPENAI_API_KEY="sk-your-key"
aider --model openai/kimi-k2.7-code
Persist these in ~/.bashrc. See the per-model guides: DeepSeek + Aider, Qwen + Aider, Kimi + Aider.
Step 4: Work in a git repo in your Linux home
Aider commits every change, so run it in a git repo; and keep that repo in your Linux home for speed:
cp -r /mnt/c/Users/YourName/myproject ~/myproject
cd ~/myproject
git status # ensure a clean tree
aider --model deepseek/deepseek-v4-flash
Save defaults in a config file
Avoid retyping flags with .aider.conf.yml in your home or project:
model: deepseek/deepseek-v4-flash
weak-model: deepseek/deepseek-v4-flash
Keep API keys in the environment, not in this file.
Aider in WSL essentials
| pipx install aider-chat | Install Aider isolated |
|---|---|
| pipx ensurepath | Put aider on your PATH |
| --model deepseek/deepseek-v4-flash | Current DeepSeek API model |
| OPENAI_API_BASE + openai/<name> | Any OpenAI-compatible provider |
| .aider.conf.yml | Persist model defaults |
WSL gotchas
aider: command not found; runpipx ensurepathand reopen the shell.- Requests hitting OpenAI; set
OPENAI_API_BASEfor OpenAI-compatible providers. - Git warnings; run inside a git repo with a clean tree.
- Slow on big repos; keep the repo in your Linux home.
Aider on WSL checklist
- WSL installed; pipx installed
- Aider installed via pipx; PATH updated
- Cheap model configured (native or openai/ + base URL)
- Project is a git repo in your Linux home
- Clean tree before launching; optional config file
Verify the installation
On Windows, install Aider in WSL with pipx: pipx install aider-chat, pipx ensurepath, then connect a cheap model; DeepSeek natively or any OpenAI-compatible provider via OPENAI_API_BASE. Run it in a git repo in your Linux home, start from a clean tree, and let it commit each change.
For backends, see DeepSeek + Aider, Qwen + Aider, and Kimi + Aider.