Replace GitHub Copilot with a free, private local alternative in VS Code.
This tutorial has grown into a full hub. For current model rankings by VRAM tier, tool comparisons (Continue vs Cline vs Aider vs Tabby), and the complete walkthrough, see the Coding Agents Hub.
1. The Short Version (2026)
- Install Ollama, then pull a coding model for your hardware:
starcoder2:7b(8 GB VRAM),devstral-small-2:24b(16 GB), orqwen3.6:27b(24 GB). - Install Continue from the VS Code Marketplace and set its provider to
ollama. - Add
starcoder2:3bas the dedicated autocomplete model — ghost text needs low latency, not size.
2. Features You Get
- Autocomplete: ghost text as you type, served from your own GPU.
- Chat: Highlight code and press
Cmd+Lto ask questions about it. - Edit: Highlight code and press
Cmd+Ito instruct the AI to refactor it.
3. Going Further
- Best local coding models by VRAM tier — what your card actually runs.
- Run a local coding agent end-to-end — the full walkthrough including Cline and context tuning.
- Local Copilot alternatives compared — Continue vs Tabby vs Cline vs Aider vs Twinny.
- Reasoning models: thinking budget and latency — when a coding model's thinking is worth the wait, and how to cap it.