A GitHub Copilot Chat-style interface that brings conversational AI directly into your editor. Ask questions, review code, and ship faster.
Everything you need for AI-assisted development, right inside VS Code.
Chat with AI in a dedicated sidebar panel. Ask about your codebase, get explanations, generate code, and debug issues — all in natural language.
Attach files, folders, images, or selected code. Folders show as a single pill like GitHub Copilot. The active file auto-attaches as context.
Review every AI-generated change with unified diffs. Keep the changes you like, undo the rest — full control over what gets applied.
Switch between AI models and providers on the fly. Use Anthropic, OpenAI, Google, or any provider configured in your OpenCode setup.
Type / to access built-in commands like /init, /compact, and custom commands. Quick model and agent switching.
AI actions require your approval. Review file reads, writes, and commands before they execute. Stay in control of your codebase.
Paste or drag screenshots directly into the chat. Ask the AI to analyze UI mockups, error screenshots, or diagrams.
Switch between chat sessions. Continue where you left off or start a fresh conversation. Your history persists across VS Code restarts.
The OpenCode server starts automatically with VS Code. No manual setup — just install and start chatting. Auto-reconnect on failures.
Why you need this extension in your workflow.
Unlike Copilot Chat, OpenCode Chat works with any AI provider. Use Claude, GPT-4, Gemini, or whatever fits your budget and needs.
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.
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.
The AI understands your entire project structure. It reads your files, follows your patterns, and generates code that fits your codebase.
Get started in 4 simple steps.
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.
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:
Your credentials are saved to ~/.config/opencode/ and will be automatically used by the VS Code extension.
Download the .vsix file from this page, then install it in VS Code.
Option A — From VS Code:
.vsix file and select itOption 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.
The extension auto-connects to your OpenCode setup. Click the ✳ OpenCode Chat icon in the activity bar or press Ctrl+Cmd+I.
/ for slash commandsQuick access to all features.
| Command | Description |
|---|---|
/file | Add files or folders to chat context |
/model | Switch the AI model |
/agent | Switch the agent mode |
/new | Start a fresh chat session |
/help | Show available commands and tips |
| Command | Description |
|---|---|
OpenCode: Open Chat | Open the chat sidebar panel |
OpenCode: New Chat | Start a new conversation |
OpenCode: Chat History | View and switch between sessions |
OpenCode: Review Pending Changes | Review Keep/Undo diffs |
OpenCode: Restart Server | Restart the OpenCode backend |
OpenCode: Add File to Chat Context | Attach a file from Explorer context menu |
Customize the extension to fit your workflow.
opencodeChat.serverPathPath to the opencode binary. Default: "opencode". Set if opencode is not in your PATH.
opencodeChat.serverUrlAttach to an existing OpenCode server instead of spawning one. E.g., http://127.0.0.1:4096.
opencodeChat.defaultModelDefault model as providerID/modelID. E.g., anthropic/claude-sonnet-4-5. Empty = OpenCode default.
opencodeChat.autoAttachActiveFileAutomatically attach the active editor file as context. Default: true. Set to false to attach manually.