An AI pair programmer in your terminal that edits your code and commits it, using a free local model
Fix a bug by typing one sentence, watch the changes appear, and throw away anything you don't like with /undo. Aider edits your project and saves every change as a git commit, using a model on your own laptop, so your code never leaves your machine.
/undo to throw away a change you don't like- A short checklist for getting good results from a small model, and a bigger-brain option for when you need more
- Ollama installed. Not done that yet? Do Run a ChatGPT-style AI on your own laptop first (15 minutes).
- git installed (
winget install --id Git.Git -eon Windows; Macs offer to install it the first time you typegit). New to git? Git without memorising covers the basics. - About 2.5GB of free disk space: 1.9GB for the model and about 480MB for Aider
- 16GB of RAM recommended
Download a small coding model
Aider is only the messenger. The model running in Ollama is what actually writes the code, so pick one trained for code.
If you've done the Ollama lesson, Ollama is already running. If not, install it first:
Windows (skip if you have Ollama)winget install --id Ollama.Ollama -eNow download Qwen2.5-Coder 3B, a small model made for writing and fixing code:
Terminalollama pull qwen2.5-coder:3bIt's a 1.9GB download, a few minutes on a typical connection. Check it's there:
Terminalollama listOutputNAME ID SIZE MODIFIED qwen2.5-coder:3b f72c60cabf62 1.9 GB 4 seconds ago ...TipWhy start small? Once loaded, the 3B model uses about 2.4GB of memory (ollama psshows this), so it runs on most laptops. The 7B version is smarter but a 4.7GB download that needs a lot more memory. Step 6 shows how to switch to it once everything works.
ollama list shows qwen2.5-coder:3b.