You don't need a $10/month Copilot subscription to get AI code completion. Ollama + Continue.dev gives you local, private, free AI coding assistance in 5 minutes.
The Setup
# 1. Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# 2. Pull a coding model
ollama pull codellama:7b-code
# 3. Install Continue.dev extension in VS Code
# Search "Continue" in marketplace, install, then:
# 4. Configure Continue to use Ollama
cat > ~/.continue/config.json << 'EOF'
{
"models": [
{
"title": "CodeLlama 7B",
"provider": "ollama",
"model": "codellama:7b-code"
}
]
}
EOF
Why This Works
| Feature | Copilot | Continue + Ollama |
|---|---|---|
| Price | $10/mo | $0 |
| Privacy | ❌ Cloud | ✅ Local |
| Model choice | Locked | Any Ollama model |
| Offline | ❌ | ✅ |
| Context window | Limited | Full file + repo |
Pro Tips
- Autocomplete: Enable in Continue settings → Tab autocomplete → Ollama
-
Chat:
Cmd+L(Mac) /Ctrl+L(Win) to open sidebar chat with your code context -
Edit mode: Select code →
Cmd+I→ describe the change -
Best models for coding:
codellama:7b-code(fast),deepseek-coder:6.7b(better quality),starcoder:3b(lightweight)
The Catch
7B models are 80% as good as Copilot for boilerplate, but struggle with complex refactoring. For heavy lifting, switch to a 13B+ model or use the chat interface with more context.
I use MonkeyCode to configure my local AI stack: https://ly.cyberserval.tech/iIETXiF
What's your local coding model of choice?
Top comments (0)