Skip to content

Install Aider on Windows With WSL

Install and run Aider on Windows using WSL. Python and pipx setup, connecting a cheap model, git workflow, config file, and the WSL-specific gotchas to avoid.

MGMCSA Guru Team August 6, 2026 3 min read
Installing and running Aider inside WSL on Windows

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-chat

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-thinking

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-chat

Save defaults in a config file

Avoid retyping flags with .aider.conf.yml in your home or project:

model: deepseek/deepseek-chat
weak-model: deepseek/deepseek-chat

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-chat Native cheap-model run
OPENAI_API_BASE + openai/<name> Any OpenAI-compatible provider
.aider.conf.yml Persist model defaults

WSL gotchas

  • aider: command not found — run pipx ensurepath and reopen the shell.
  • Requests hitting OpenAI — set OPENAI_API_BASE for 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

Wrapping up

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.

Frequently asked questions

Should I run Aider in WSL on Windows?

Yes, WSL is the smoother choice. Aider leans heavily on git and a Unix-like shell, both of which behave most predictably in WSL. Native Windows works but you'll meet more friction around git and environment variables.

How do I install Aider in WSL?

Use pipx inside WSL: install pipx, then pipx install aider-chat, then pipx ensurepath and reopen the shell. pipx isolates Aider's dependencies so it doesn't clash with system Python.

How do I connect a cheap model?

Aider has built-in support for many providers — for DeepSeek, set DEEPSEEK_API_KEY and run aider --model deepseek/deepseek-chat. For any OpenAI-compatible endpoint, set OPENAI_API_BASE and OPENAI_API_KEY and use --model openai/.

Where should my project live?

In a git repo inside your Linux home for the fastest experience. Aider commits each change, and git plus file operations are quicker in the Linux file system than across /mnt/c.

Why pipx instead of pip?

pipx installs CLI tools in isolated environments and puts them on your PATH, avoiding dependency conflicts with other Python packages. It's the recommended way to install Aider cleanly.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.