opencode/packages/desktop
2026-09-02 19:07:12 +10:00
..
icons
resources fix(desktop): grant Windows sandbox access during installation (#46696) 2026-09-02 12:08:34 +10:00
scripts fix(desktop): stabilize bundled dev and process exit (#46523) 2026-09-02 08:26:57 +00:00
src fix(desktop): publish native menu zoom changes (#46773) 2026-09-02 19:07:12 +10:00
.gitignore
AGENTS.md
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): stabilize bundled dev and process exit (#46523) 2026-09-02 08:26:57 +00:00
package.json fix(desktop): stabilize bundled dev and process exit (#46523) 2026-09-02 08:26:57 +00:00
README.md fix(desktop): bundle the CLI in production releases (#46705) 2026-09-02 12:15:25 +10:00
sst-env.d.ts
tsconfig.json

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.