opencode/packages/desktop
2026-09-07 21:29:04 +10:00
..
icons refactor(desktop): consolidate desktop-electron into desktop package (#25822) 2026-05-05 13:43:36 +08:00
resources fix(desktop): grant Windows sandbox access during installation (#46696) 2026-09-02 12:08:34 +10:00
scripts fix(desktop): brand macOS dev app as OpenCode Dev (#47744) 2026-09-07 14:45:57 +08:00
src feat(desktop): add browser tabs and Chromium diagnostics (#44838) 2026-09-07 20:58:02 +10:00
test test(browser): reject denied sources over native RPC 2026-09-07 21:29:04 +10:00
.gitignore feat(desktop): reintroduce AppStream MetaInfo for Linux desktop builds (#27253) 2026-05-13 13:14:39 +08:00
AGENTS.md fix(desktop): persist renderer state in SQLite instead of electron-store (#47695) 2026-09-07 10:51:46 +10:00
drizzle.config.ts fix(desktop): persist renderer state in SQLite instead of electron-store (#47695) 2026-09-07 10:51:46 +10:00
electron-builder.config.test.ts fix(desktop): bundle the CLI in production releases (#46705) 2026-09-02 12:15:25 +10:00
electron-builder.config.ts fix(desktop): bundle the CLI in production releases (#46705) 2026-09-02 12:15:25 +10:00
electron.vite.config.test.ts chore(desktop): trim external dependency archives (#45804) 2026-08-28 02:24:46 +00:00
electron.vite.config.ts fix(desktop): emit preload as .cjs so it loads under --no-sandbox (#47691) 2026-09-07 09:14:38 +10:00
package.json feat(desktop): add browser tabs and Chromium diagnostics (#44838) 2026-09-07 20:58:02 +10:00
README.md fix(desktop): bundle the CLI in production releases (#46705) 2026-09-02 12:15:25 +10:00
sst-env.d.ts zen: update sst version 2026-02-18 13:54:23 -05:00
tsconfig.json refactor(desktop): consolidate desktop-electron into desktop package (#25822) 2026-05-05 13:43:36 +08:00

OpenCode Desktop

The OpenCode Desktop app, built with Electron.

Development

bun install
bun dev

Build

Run the build script to build the app's JS assets, then package to bundle the assets as an application. The resulting app will be in dist/.

bun run build && bun run package

Production builds require a prebuilt V2 CLI distribution. The release workflow supplies the artifact from the same run:

OPENCODE_CHANNEL=prod OPENCODE_CLI_DIST=/absolute/path/to/packages/cli/dist bun run build
OPENCODE_CHANNEL=prod bun run package

Set OPENCODE_CLI_TARGET when packaging for a different architecture. The CLI is placed outside app.asar in the application's resources directory, and packaging fails if it is missing.

CLI preparation uses these channel rules:

Channel Without OPENCODE_CLI_DIST With OPENCODE_CLI_DIST
dev, local, unset, or unrecognized Download the dev CLI Download the dev CLI; ignore the distribution
beta Download the beta CLI Copy the supplied CLI; fail if it is missing
prod, latest Fail before changing resources Copy the supplied CLI; fail if it is missing

bun dev is separate from packaging: it uses local renderer/server mode, the dev app identity, and the CLI source by default. bun dev --download-server <version> instead downloads that CLI version for local development. Neither path requires OPENCODE_CLI_DIST or runs the production prebuild.