Want an AI coding assistant that works on YOUR codebase, respects YOUR git history, and doesn't send your code to the cloud? Aider + Ollama gives you exactly that.
Aider is an AI pair programming tool that works directly in your terminal. It sees your files, understands your git repo, and makes real edits to your code. Paired with Ollama running a local model, you get a fully private coding assistant.
Prerequisites
- GPU: RTX 3090 or 4090 with 16GB+ VRAM (for Qwen3 Coder 30B at Q4)
- Software: Python 3.10+, Ollama installed
- Time: ~10 minutes setup
Installation
# Install Aider
pip install aider-chat
# Pull a capable coding model
ollama pull qwen3-coder:30b-a3b
Configuration
Set Aider to use your local Ollama model:
# For bash/zsh
export OLLAMA_CONTEXT_LENGTH=8192
# Run Aider with Ollama
aider --model ollama_chat/qwen3-coder:30b-a3b --editor
For persistent config, create .env in your project:
OLLAMA_CONTEXT_LENGTH=8192
AIDER_MODEL=ollama_chat/qwen3-coder:30b-a3b
Usage
# Start Aider in your project directory
cd my-project
aider --model ollama_chat/qwen3-coder:30b-a3b
# Now just describe what you want:
# "Add error handling to the API routes"
# "Refactor the database connection into a singleton"
# "Write unit tests for the user service"
Aider reads your files, makes changes, and commits them with sensible messages. You approve each change before it's applied.
Results
On a RTX 4090 with Qwen3 Coder 30B at Q4: ~15-20 tok/s, enough for real-time code suggestions.
Qwen2.5 Coder 14B runs faster (~35 tok/s) and fits on a 12GB GPU, great for smaller projects.
Why Local?
- Privacy - your proprietary code never leaves your machine
- No API costs - unlimited suggestions for $0/month
- Works offline - code on a plane, in a cafe, anywhere
- No rate limits - use it all day without throttling
Originally published on everylocalai.com
Top comments (0)