Using Ollama with VS Code for Local AI-Assisted Development

Published: (March 7, 2026 at 07:33 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

If you want an AI coding assistant that runs locally without sending your code to the cloud, Ollama makes it easy to run an LLM on your machine and integrates with Visual Studio Code (and other IDEs).

Install Ollama

  1. Download and install Ollama from the official site.
  2. Verify the installation in a terminal:
ollama --version

Run a Model

Choose a model that fits your hardware (RAM/CPU/GPU). For coding tasks, a good starting point is qwen3-coder:7b.

ollama run qwen3-coder

The model will be downloaded automatically the first time you run it. You can also test the model via the Ollama GUI.

Install a VS Code Extension

A popular extension that supports Ollama is Continue.

  1. Open VS Code.
  2. Go to the Extensions view (Ctrl+Shift+X).
  3. Search for Continue and click Install.

Configure the Extension to Use Ollama

Open the Continue configuration file, typically located at ~/.continue/config.json, and add your local Ollama model:

{
  "models": [
    {
      "title": "My Qwen3 Coder Model",
      "provider": "ollama",
      "model": "qwen3-coder:7b"
    }
  ]
}

Save the file and restart VS Code.

Using the Assistant

You can now ask questions or give instructions directly in the IDE, for example:

  • “Explain this codebase.”
  • “Add the following feature …”
  • “Write unit tests for the file UserService.cs.”

All requests are processed locally through Ollama using the model you configured.

Ollama provides a private, offline AI coding assistant that can serve as an alternative to cloud‑based tools like ChatGPT or Claude—especially useful when you need offline access, run out of credits, or prioritize privacy. It’s free to run and works with many open‑source models.

0 views
Back to Blog

Related posts

Read more »