Cloud coding assistants are powerful, but they send your code to someone else's servers and often charge per month or per token. If you'd rather keep your code on your own PC, several coding assistants can connect to a model running locally through Ollama or LM Studio. We've picked four, based on what each project's official documentation says it supports.
Quick picks
Tool | Best for | Where it runs | Local runtimes in its docs |
|---|
Continue | Chat and autocomplete inside your editor | IDE extensions and a CLI | Ollama |
Cline | Agent-style tasks in your editor | Editor extension, Cline Desktop, CLI | Ollama, LM Studio, Atomic Chat |
Aider | Pair programming in the terminal | Command line | Ollama, LM Studio |
OpenCode | A terminal agent that finds local models for you | Command line | Ollama, LM Studio, vLLM |
1. Continue: best for working inside your editor
Continue runs as an IDE extension, and its documentation also covers a CLI. Its "Using Ollama with Continue" guide walks through installing Ollama, pulling models with ollama pull, and adding them to Continue's config.yaml using pre-configured model blocks. Continue notes that you should use ollama pull rather than ollama run to download models, because run starts an interactive session Continue doesn't need.
Continue's guide lists minimum requirements of 8GB of RAM (16GB or more recommended) and at least 10GB of free storage. If you already use Ollama in VS Code, our guide to using Ollama in VS Code covers the basics.
2. Cline: best for agent-style tasks
Cline's documentation covers agent features such as Plan & Act mode and checkpoints. Its local models page covers three runtimes: Ollama (base URL http://localhost:11434), LM Studio (http://localhost:1234) and Atomic Chat. Cline Desktop has a Local Models page that can recommend, download and set up models for your hardware.
Cline is unusually specific about memory. Its documentation suggests 16-32GB of RAM for small or quantised models, 32-64GB for mid-size coding models and 64GB or more for larger models and bigger context windows. It also recommends turning on Use Compact Prompt in Cline's settings and keeping tasks focused, because a smaller context means faster responses on local hardware.
3. Aider: best for the terminal
Aider is an AI pair programmer that runs in your terminal and works with Git. Its Ollama page shows how to install Aider, set OLLAMA_API_BASE to http://127.0.0.1:11434, and start it with aider --model ollama_chat/<model>. Aider recommends the ollama_chat/ prefix over ollama/.
Aider's documentation includes an important warning: Ollama uses a 2k context window by default and silently discards context that exceeds it. Aider says it sets Ollama's context window large enough for each request plus 8k tokens for the reply, so your code isn't dropped without you knowing. Our guides to setting Ollama's context length and how context length affects VRAM explain the trade-off.
4. OpenCode: best for automatic local model discovery
OpenCode is a terminal-based coding agent. Its providers documentation says that if Ollama is running, OpenCode probes http://127.0.0.1:11434, discovers completion models and adds them to its model list without an account connection. It also has built-in local discovery for LM Studio (http://127.0.0.1:1234/v1) and vLLM (http://127.0.0.1:8000/v1). Embedding-only models don't appear, because OpenCode only adds models whose Ollama metadata includes the completion capability. We have a step-by-step guide to using OpenCode with Ollama.
What hardware do you need?
Cline's guidance above shows how much memory local coding models can need, and longer context windows use more memory. Start with our guides to how much VRAM you need and the best GPU for local LLMs, and see best local LLM models for model suggestions. If you'd rather run the model on another PC, see sharing Ollama on your local network.
Our verdict
Continue is the easiest start if you want help inside your editor, and Cline is the pick for agent-style tasks, with the clearest hardware guidance of the four. Aider suits developers who live in the terminal and use Git, and OpenCode is the quickest to connect because it finds local Ollama, LM Studio and vLLM models automatically. All four can connect to local models; your results will depend heavily on the model and your hardware.