emmet24276 downloadsEmbed OpenCode web UI in the Obsidian sidebar via WSL bridge.
Embed OpenCode web UI in the Obsidian sidebar via WSL.
Obsidian (Windows) WSL (Linux)
┌─────────────────────┐ ┌──────────────────────┐
│ <iframe> │ ← HTTP/SSE →│ opencode serve │
│ OpenCode Web UI │ 127.0.0.1 │ (REST API + Web UI) │
└─────────────────────┘ └──────────────────────┘
curl -fsSL https://opencode.ai/install.sh | bash)BRAT: Add a beta plugin for testinghttps://github.com/emmet24/obsidian-opencode-wsl<vault>/.obsidian/plugins/opencode-wsl/Toggle OpenCode panel from the command paletteWhen enabled (default), the server starts automatically when you open the sidebar panel. When disabled, click "Start OpenCode" in the panel to launch the server manually.
| Setting | Default | Description |
|---|---|---|
| Auto-start server | ON | Start server automatically when panel opens |
| Server port | 14096 | Port for the OpenCode server |
| WSL distribution | (default) | Leave empty to use the default WSL distro |
| OpenCode path (WSL) | opencode | Path to the opencode executable inside WSL |
| Working directory (WSL path) | auto-detected | Working directory passed via wsl.exe --cd |
| Server password | (empty) | OPENCODE_SERVER_PASSWORD for auth |
git clone https://github.com/emmet24/obsidian-opencode-wsl.git
cd obsidian-opencode-wsl
npm install
npm run build
opencode-wsl/
├── src/
│ ├── main.ts # Plugin entry, settings tab, view registration
│ ├── settings.ts # Settings interface and defaults
│ ├── serverManager.ts # WSL opencode serve process lifecycle
│ └── views/
│ └── opencodeView.ts # iframe-based sidebar view
├── esbuild.config.mjs # Build configuration
├── manifest.json # Plugin metadata
├── styles.css # iframe and status styles
└── package.json # Dependencies
| Branch | Version | Approach |
|---|---|---|
main |
2.0.0 | ✅ iframe embedding of OpenCode web UI (current) |
| (git history) | 1.0.3 | PTY bridge + xterm.js TUI (archived) |
MIT