Local OpenCode Sidebar is a Visual Studio Code extension that adds a native chat panel connected to a local OpenCode-compatible API endpoint (local or remote).
Prerequisites
- Docker installed and running
- OpenCode container available on port
4096 (or your configured endpoint)
Start OpenCode with:
docker run -d -p 4096:4096 --name Opencode ghcr.io/anomalyco/Opencode
Build and Package
Install dependencies:
npm install
Compile TypeScript checks:
npm run compile
Build bundle:
npm run build
Create a VSIX package:
npm run package
Usage
- Launch the extension host from VS Code/Visual Studio extension debugging.
- Open the Local OpenCode icon in the activity bar.
- Type a message in Local OpenCode AI and send it.
- The extension sends your messages to the configured
localOpencode.apiEndpoint.
Commands
After installing the extension, open the Command Palette and search for Local OpenCode to use the main commands:
Chat: Focus on Local OpenCode AI View
Local OpenCode: Open Settings
Local OpenCode: Clear Chat
Settings
localOpencode.apiEndpoint (default: http://localhost:4096)
localOpencode.apiTimeoutMs (default: 0)
Use Local OpenCode: Open Settings to change the API URL used by the extension. This also lets you point the extension to a local container running on a different port, for example:
"localOpencode.apiEndpoint": "http://localhost:4096"
By default, API requests wait indefinitely because some model responses can take longer depending on the prompt, selected model, and local resources:
"localOpencode.apiTimeoutMs": 0
Set localOpencode.apiTimeoutMs to a positive number of milliseconds if you prefer to enforce a request timeout. For example, this waits up to two minutes:
"localOpencode.apiTimeoutMs": 120000
If you change the local container port, make sure the Docker port mapping and localOpencode.apiEndpoint use the same port:
docker run -d -p 4096:4096 --name Opencode ghcr.io/anomalyco/Opencode