VS Code Extension • .vsix

AI Chat for VS Code,
Powered by OpenCode

A GitHub Copilot Chat-style interface that brings conversational AI directly into your editor. Ask questions, review code, and ship faster.

Features

Everything you need for AI-assisted development, right inside VS Code.

💬

Conversational AI Chat

Chat with AI in a dedicated sidebar panel. Ask about your codebase, get explanations, generate code, and debug issues — all in natural language.

📎

Smart Context Attachments

Attach files, folders, images, or selected code. Folders show as a single pill like GitHub Copilot. The active file auto-attaches as context.

🔄

Keep / Undo Code Changes

Review every AI-generated change with unified diffs. Keep the changes you like, undo the rest — full control over what gets applied.

🤖

Multi-Model Support

Switch between AI models and providers on the fly. Use Anthropic, OpenAI, Google, or any provider configured in your OpenCode setup.

Slash Commands

Type / to access built-in commands like /init, /compact, and custom commands. Quick model and agent switching.

🔒

Permission System

AI actions require your approval. Review file reads, writes, and commands before they execute. Stay in control of your codebase.

🖼️

Image & Screenshot Support

Paste or drag screenshots directly into the chat. Ask the AI to analyze UI mockups, error screenshots, or diagrams.

🗂️

Session History

Switch between chat sessions. Continue where you left off or start a fresh conversation. Your history persists across VS Code restarts.

🚀

Auto Server Management

The OpenCode server starts automatically with VS Code. No manual setup — just install and start chatting. Auto-reconnect on failures.

Why OpenCode Chat?

Why you need this extension in your workflow.

🔓 Vendor Lock-In Free

Unlike Copilot Chat, OpenCode Chat works with any AI provider. Use Claude, GPT-4, Gemini, or whatever fits your budget and needs.

💰 Cost Control

Pay only for what you use with your own API keys. No subscription required. Use cheaper models for simple tasks and powerful models when you need them.

📝 Code Review Flow

Every file change goes through a Keep/Undo review step. Unlike chat-only tools, you see exactly what changes before they're applied to your code.

🎯 Workspace Aware

The AI understands your entire project structure. It reads your files, follows your patterns, and generates code that fits your codebase.

How to Use

Get started in 4 simple steps.

1

Install OpenCode CLI

First, install the OpenCode command-line tool on your system.

Option A — Homebrew (recommended):

brew install opencode

Option B — npm:

npm install -g opencode

Option C — Manual install:

Download the binary from github.com/anomalyco/opencode/releases, extract it, and move it to your PATH.

Option A — npm (recommended):

npm install -g opencode

Option B — Manual install:

Download the Windows .exe from github.com/anomalyco/opencode/releases, extract it, and add it to your PATH.

Open PowerShell or Command Prompt to run the commands below.

2

Run OpenCode & Log In

Open your terminal and launch OpenCode. Follow the prompts to log in and configure your AI provider.

opencode

On first run, OpenCode will guide you through:

  • Creating an account or logging in
  • Adding your API key (OpenAI, Anthropic, etc.)
  • Selecting your default model

Your credentials are saved to ~/.config/opencode/ and will be automatically used by the VS Code extension.

3

Install the VS Code Extension

Download the .vsix file from this page, then install it in VS Code.

Option A — From VS Code:

  1. Open VS Code
  2. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  3. Type "Extensions: Install from VSIX..." and select it
  4. Browse to the downloaded .vsix file and select it
  5. Reload VS Code when prompted (Cmd+Shift+P → "Developer: Reload Window")

Option B — From command line:

code --install-extension path/to/opencode-chat-x.x.x.vsix --force

Replace path/to/ with the actual path to your downloaded file.

4

Start Chatting

The extension auto-connects to your OpenCode setup. Click the ✳ OpenCode Chat icon in the activity bar or press Ctrl+Cmd+I.

  • Ask questions about your code
  • Attach files, folders, or screenshots
  • Use / for slash commands
  • Review changes with Keep/Undo before applying

Commands & Shortcuts

Quick access to all features.

Keyboard Shortcuts

Open Chat Ctrl+Cmd+I

Slash Commands

CommandDescription
/fileAdd files or folders to chat context
/modelSwitch the AI model
/agentSwitch the agent mode
/newStart a fresh chat session
/helpShow available commands and tips

Extension Commands

CommandDescription
OpenCode: Open ChatOpen the chat sidebar panel
OpenCode: New ChatStart a new conversation
OpenCode: Chat HistoryView and switch between sessions
OpenCode: Review Pending ChangesReview Keep/Undo diffs
OpenCode: Restart ServerRestart the OpenCode backend
OpenCode: Add File to Chat ContextAttach a file from Explorer context menu

Configuration

Customize the extension to fit your workflow.

opencodeChat.serverPath

Path to the opencode binary. Default: "opencode". Set if opencode is not in your PATH.

opencodeChat.serverUrl

Attach to an existing OpenCode server instead of spawning one. E.g., http://127.0.0.1:4096.

opencodeChat.defaultModel

Default model as providerID/modelID. E.g., anthropic/claude-sonnet-4-5. Empty = OpenCode default.

opencodeChat.autoAttachActiveFile

Automatically attach the active editor file as context. Default: true. Set to false to attach manually.