IDE
The OpenCode extension for VS Code, Cursor, and other IDEs
OpenCode integrates with VS Code, Cursor, or any IDE that supports a terminal. Just run opencode in the terminal to get started.
Usage
- Quick Launch: Use
Cmd+Esc(Mac) orCtrl+Esc(Windows/Linux) to open OpenCode in a split terminal view, or focus an existing terminal session if one is already running. - New Session: Use
Cmd+Shift+Esc(Mac) orCtrl+Shift+Esc(Windows/Linux) to start a new OpenCode terminal session, even if one is already open. You can also click the OpenCode button in the UI. - Context Awareness: Automatically share your current selection or tab with OpenCode.
- File Reference Shortcuts: Use
Cmd+Option+K(Mac) orAlt+Ctrl+K(Linux/Windows) to insert file references. For example,@File#L37-42.
Installation
To install OpenCode on VS Code and popular forks like Cursor, Windsurf, VSCodium:
- Open your IDE’s Extension Marketplace.
- Search for OpenCode and click Install.
- Open the integrated terminal and run
opencode.
If on the other hand you want to use your own IDE when you run /editor or /export from the TUI, you’ll need to set export EDITOR="code --wait". Learn more.
Troubleshooting
If the extension doesn’t work after installation:
- Ensure you’re running
opencodein the integrated terminal. - Confirm that OpenCode is installed and enabled in your IDE’s Extensions view.
- Restart the integrated terminal after installing the extension.