-
Notifications
You must be signed in to change notification settings - Fork 0
Development Guide
martian7777 edited this page Jul 19, 2026
·
1 revision
Build from source, run tests, and contribute to opencode Studio.
- Node.js ≥ 18
- npm (included with Node.js)
- VS Code (for running the extension in development)
- opencode CLI installed
git clone https://github.com/martian7777/opencode-gui.git
cd opencode-gui
npm installnpm run build # Build everything (webview + extension)
npm run build:webview # Build only the React webview
npm run build:extension # Build only the extension hostThe webview builds with Vite into packages/extension/media/webview/.
The extension builds with esbuild into packages/extension/dist/.
- Open the repo in VS Code
- Press
F5(or Run → Start Debugging) - This launches an Extension Development Host window
- The opencode icon appears in the Activity Bar
npm run watch # Rebuilds both packages on file changesnpm test # Run webview unit tests (Vitest)npm run package # Produces opencode-gui.vsixThe VSIX is created at packages/extension/opencode-gui.vsix.
opencode-gui/
├── packages/
│ ├── shared/ # Typed RPC protocol (shared types)
│ │ └── src/protocol.ts
│ ├── webview/ # React GUI (Vite + Tailwind)
│ │ └── src/
│ │ ├── components/ # UI components
│ │ ├── lib/ # Utilities
│ │ └── state/ # State management
│ └── extension/ # VS Code extension host (esbuild)
│ └── src/
│ ├── extension.ts # Entry point
│ ├── server.ts # Server lifecycle
│ ├── rpc.ts # RPC handler
│ └── webview.ts # Webview panel
├── .github/workflows/
│ ├── ci.yml # PR checks
│ └── release.yml # Auto-publish on tag
└── package.json # Monorepo root
Push a version tag and CI publishes automatically:
# 1. Bump version in packages/extension/package.json
# 2. Commit and tag
git tag v0.1.3 && git push origin v0.1.3CI publishes to both VS Code Marketplace and Open VSX.
Required repo secrets:
| Secret | Purpose |
|---|---|
VSCE_PAT |
Azure DevOps PAT for VS Code Marketplace |
OVSX_PAT |
Open VSX access token |
- Fork the repo
- Create a branch:
git checkout -b feat/my-feature - Make your changes
- Run tests:
npm test - Commit:
git commit -m 'feat: add my feature' - Push:
git push origin feat/my-feature - Open a Pull Request