A lightweight VSCode extension providing a native GUI for OpenCode CLI.
- 💬 Chat interface for OpenCode CLI in VSCode sidebar
- 🔄 Server lifecycle management (spawn/stop/restart)
- ✅ Permission approval workflow with keyboard shortcuts
- ⌨️ Slash command parity with OpenCode TUI
- 📊 Real-time inline diff visualization
- VSCode 1.85.0 or higher
- Node.js 20.x or higher
- OpenCode CLI installed and in PATH
- Clone the repository:
git clone <repository-url>
cd opengui- Install dependencies:
npm install- Build the extension:
npm run compile- Run in Extension Development Host:
- Press
F5in VSCode - Or use "Run Extension" from the debug menu
- Press
opengui/
├── src/
│ ├── extension.ts # Extension entry point
│ ├── services/ # Core services (ServerManager, etc.)
│ ├── providers/ # VSCode providers
│ ├── commands/ # Command handlers
│ ├── types/ # TypeScript type definitions
│ └── webview/ # React webview UI
│ ├── App.tsx
│ ├── components/
│ └── styles/
├── .md/ # Documentation
│ ├── PRD.md # Product requirements
│ └── p0.md # P0 implementation plan
└── dist/ # Build output
npm run compile- Build extension and webviewnpm run watch- Watch mode for developmentnpm run package- Package extension as .vsixnpm run lint- Run ESLint
OpenGUI can be configured through VSCode settings (Cmd+, or Ctrl+,):
opengui.opencodePath- Path to OpenCode binaryopengui.serverUrl- Connect to existing server URLopengui.autoStart- Auto-start server on activationopengui.defaultModel- Default model for new sessions
- Click the OpenGUI icon in the Activity Bar
- Start chatting with OpenCode
- Approve/reject tool requests with keyboard shortcuts (1/2/3)
1- Approve permission request once2- Approve permission request always (for this workspace)3- Reject permission request and provide feedback/- Trigger slash command autocomplete@- Trigger file/symbol autocomplete
All OpenCode TUI commands work in the extension:
/help- Show available commands/clear- Clear conversation/checkpoint- Create a checkpoint/rewind- Rewind to a checkpoint/model- Switch model
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT