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-chat
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-chat --weak-model deepseek/deepseek-chat
DeepSeek models with Aider
| deepseek/deepseek-chat | Main coding model; cheap and fast |
|---|---|
| deepseek/deepseek-reasoner | Thinking mode for hard problems |
| --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-chat
weak-model: deepseek/deepseek-chat
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 (deepseek/deepseek-chat), which tells Aider the provider. - 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-chat
- Optional weak-model set to save tokens
- Started from a clean git working tree
Wrapping up
DeepSeek with Aider is git-native pair programming for pennies: install Aider with pipx, export DEEPSEEK_API_KEY, and run aider --model deepseek/deepseek-chat. Add a weak model and a .aider.conf.yml to make it the default and trim token use. Every change becomes a commit, so big refactors stay safe and reviewable.
To use DeepSeek with a different tool, see DeepSeek + OpenCode or run DeepSeek with Claude Code.