Continue.dev — Open-Source AI Coding Assistant for VS Code and JetBrains

Sanjeev SharmaSanjeev Sharma
5 min read

Advertisement

Introduction

Why This Matters

Every major AI coding tool locks you into a single model. Copilot uses GPT-4. Cursor uses Claude and GPT-4. Continue.dev breaks that lock: it is an open-source extension that lets you wire any language model — cloud or local — into your editor. This means you can use Claude 3.5 Sonnet for complex reasoning, run Llama 3 locally for privacy, and switch between them without leaving VS Code. For developers who want control over which model handles their code and what data is sent where, Continue.dev is the most flexible option available.

What Continue.dev Provides

Continue.dev adds three capabilities to your editor:

  1. Chat: A sidebar conversation with any connected LLM, with access to selected code and file context
  2. Autocomplete: Tab-completion powered by your chosen model (works with fast local models)
  3. Slash commands: Built-in commands like /edit, /test, /comment, and /share that perform targeted actions on selected code

The extension is open source (Apache 2.0), self-hostable, and free. You pay only for the API calls you make to your chosen model provider.

Installation

VS Code:

  1. Open Extensions (Ctrl+Shift+X)
  2. Search "Continue"
  3. Install the official Continue extension
  4. A config.json file opens — this is where you configure your models

JetBrains:

Install from the JetBrains Plugin Marketplace, then configure via the Continue tool window.

Configuring Models

Continue uses a ~/.continue/config.json file to define which models to use for chat and autocomplete.

Claude via Anthropic API:

{
  "models": [
    {
      "title": "Claude Sonnet",
      "provider": "anthropic",
      "model": "claude-sonnet-4-5",
      "apiKey": "sk-ant-..."
    }
  ],
  "tabAutocompleteModel": {
    "title": "Starcoder2 Local",
    "provider": "ollama",
    "model": "starcoder2:3b"
  }
}

Local model via Ollama:

{
  "models": [
    {
      "title": "Llama 3 Local",
      "provider": "ollama",
      "model": "llama3"
    }
  ]
}

OpenAI-compatible endpoint:

{
  "models": [
    {
      "title": "Local vLLM",
      "provider": "openai",
      "model": "mistral-7b",
      "apiBase": "http://localhost:8000/v1",
      "apiKey": "none"
    }
  ]
}

Chat Workflows

Open the Continue sidebar (Cmd+L on Mac, Ctrl+L on Windows). You can:

  • Select code and press Cmd+L to send it to chat automatically
  • Type a question and get a response with full file context
  • Apply suggested changes with a one-click diff review

Example interaction:

User: This function is O(n^2). Can you rewrite it to be more efficient?
 
[Selected code sent automatically]
 
Continue (Claude): Here's an O(n) version using a hash map...
[Diff shown with Apply button]

Slash Commands

Type / in the chat input to access built-in commands:

CommandAction
/editEdit selected code based on your instruction
/testGenerate tests for selected code
/commentAdd docstrings to selected functions
/shareExport the conversation as a shareable link
/cmdGenerate a terminal command from a description

You can define custom slash commands in config.json for project-specific workflows.

Context Providers

Continue lets you inject additional context into every chat message using @ mentions:

  • @file src/auth/login.ts — include this file in context
  • @codebase — search the entire codebase for relevant files
  • @docs https://fastapi.tiangolo.com — include docs from a URL
  • @terminal — include recent terminal output
  • @problems — include VS Code diagnostic errors

This context system is what makes Continue genuinely powerful for large codebases — you are not limited to what is visible on screen.

Common Mistakes

  • Using a slow cloud model for autocomplete: Autocomplete needs sub-100ms response times. Use a local Ollama model (Starcoder2, DeepSeek Coder) for autocomplete and a smarter cloud model for chat.
  • Not setting a system prompt: Continue allows a custom system prompt in config.json. A good system prompt specifying your stack reduces irrelevant suggestions.
  • Ignoring context providers: Most users type questions without adding file context. Use @file to include the relevant files explicitly.
  • Storing API keys in the shared config: If your config.json is committed to a repo, use environment variables instead of raw keys.

Best Practices

  • Use Claude or GPT-4 for chat, and a local quantized model (via Ollama) for autocomplete
  • Write a system prompt that describes your project's language, framework, and conventions
  • Use @codebase sparingly — it triggers a semantic search that adds latency
  • Add custom slash commands for repetitive tasks like generating migration scripts or API stubs
  • Review all applied edits in the diff view before accepting; Continue shows exactly what changed

Key Takeaways

  • Continue.dev is a free, open-source AI coding extension for VS Code and JetBrains under Apache 2.0
  • It supports any LLM provider: Anthropic, OpenAI, Google, Ollama, and any OpenAI-compatible API
  • Models for chat and autocomplete are configured separately in ~/.continue/config.json
  • Context providers let you inject files, docs, terminal output, and codebase search into every chat
  • Slash commands like /edit, /test, and /comment perform targeted code actions without full conversation
  • Using a local model for autocomplete and a cloud model for chat is the recommended performance configuration
  • No code is sent anywhere by default with a local Ollama model — full privacy for sensitive projects
  • Custom slash commands and system prompts make Continue.dev adaptable to any project's specific workflow

Advertisement

Sanjeev Sharma

Written by

Sanjeev Sharma

Full Stack Engineer · E-mopro

Related reading