Aider is the git-native pair programmer: it edits your files and writes a commit for every change, so your history stays clean and every step is reversible. Pair it with DeepSeek’s pay-per-token pricing and you get serious AI pair programming for pennies a session; free tool, near-free model.
This is the Windows setup, including the config that saves the most tokens. Aider has built-in DeepSeek support, so there’s no proxy to configure. For how Aider stacks up against other agents, see best cheap Claude Code alternatives.
Step 1: Install Aider
Aider installs with pip or, better, pipx (which isolates it):
python -m pip install pipx
pipx install aider-chat
On Windows this works in PowerShell, but Aider leans heavily on git and the shell, so WSL is smoother; see install Aider on Windows with WSL and the WSL install guide.
Step 2: Get a DeepSeek API key
Create a DeepSeek account, add a little credit, and generate a key. Aider reads it from the environment.
Step 3: Run Aider on DeepSeek
Aider supports DeepSeek natively. Set the key and pass the model:
export DEEPSEEK_API_KEY="sk-your-key"
aider --model deepseek/deepseek-v4-flash
That’s it; no custom endpoint, no proxy. Aider connects to DeepSeek directly using its built-in provider. On PowerShell, set the variable with $env:DEEPSEEK_API_KEY = "sk-your-key" first.
Step 4: Pick models (and a cheap weak model)
Aider can use two models: a main model for coding and a cheaper “weak” model for commit messages and minor tasks. That keeps costs down further:
aider --model deepseek/deepseek-v4-pro --weak-model deepseek/deepseek-v4-flash
DeepSeek models with Aider
| deepseek/deepseek-v4-flash | Routine coding and faster responses |
|---|---|
| deepseek/deepseek-v4-pro | Harder reasoning and complex debugging |
| --weak-model | Cheaper model for commits/minor calls |
Save settings in a config file
Rather than passing flags each time, put them in .aider.conf.yml in your home or project directory:
model: deepseek/deepseek-v4-pro
weak-model: deepseek/deepseek-v4-flash
Now aider uses DeepSeek by default. Keep the API key in the environment, not in this file.
Working with git
Aider’s defining feature is the commit-per-change workflow. Each edit lands as its own commit, so you can review with git log, revert a single step with git revert, or squash later. For large refactors this is the safety net that makes an autonomous agent comfortable to use.
Pricing
Aider is free; DeepSeek is pay-per-token with no coding plan, plus cache-hit discounts and off-peak windows. The combination is one of the cheapest ways to do agentic coding. Confirm current DeepSeek rates on its pricing page; see DeepSeek V4 pricing explained.
Troubleshooting
- Auth errors;
DEEPSEEK_API_KEYisn’t set in the current shell. aider: command not found; pipx’s bin dir isn’t on PATH; runpipx ensurepathand reopen the shell.- Model errors: use the
deepseek/prefix, for exampledeepseek/deepseek-v4-flash, which tells Aider which provider to call. - Git warnings; run Aider inside a git repo with a clean tree.
DeepSeek + Aider checklist
- Aider installed via pipx
- DeepSeek key created and exported
- Run with --model deepseek/deepseek-v4-flash
- Optional weak-model set to save tokens
- Started from a clean git working tree
Verify the model
Run a small edit with deepseek/deepseek-v4-flash and inspect Aider’s commit before trying a larger change. If Aider warns that the model is unknown, update Aider and its LiteLLM dependency, then check DeepSeek’s current model list.
To use DeepSeek with a different tool, see DeepSeek + OpenCode or run DeepSeek with Claude Code.