opencode
opencode copied to clipboard
OpenCode Desktop app
Adds @opencode-ai/desktop to @opencode-ai/tauri, with CI setup for building and uploading assets as debug artifacts and as release assets. The Tauri app embeds the opencode binary as a sidecar, and runs it as a child process.
A summary of changes in no particular order:
-
@opencode-ai/desktopis now consumable as a library, exporting both runtime code and config- I've given the package it's own
/viteexport so that any plugins and config can be shared between its consumers' Vite configs
- I've given the package it's own
- Running
bun tauri devinpackages/tauriwill now performing the following preparation steps:- An
opencodebinary for the specified target will be searched for inpackages/opencode/dist/{target}/bin - If no binary is found,
bun run build --singlewill be used to build the binary for the current target (this doesn't yet support building a specific target) - The binary will be copied into
packages/tauri/src-tauri/binaries
- An
- CI now builds Desktop for
x86_64-apple-darwin,aarch64-apple-darwin,x86_64-pc-windows-msvc, andx86_64-unknown-linux-gnu- This happens after the CLI release completes
-
packages/tauri/scripts/prepare.tsis used to download theopencodebinary for the specified target - The updater currently uses OS dialogs for checking for updates on startup, see here for how to have more control over it
- The updater currently sources updates from GitHub releases, this can be changed to be your own domain or update server
- The version number from the app is being pulled from
packages/tauri/package.json
Pending tasks and questions:
- [ ]
tauri-actionwill require areleaseIdto upload assets to, right now I have it set to create a draft release - [ ] Should the CI flow be redesigned so that release doesn't complete until the desktop app is ready?
- [x] Generate a public/provide key for the updater
- [ ] macOS Codesigning: Requires
APPLE_CERTIFICATEandAPPLE_CERTIFICATE_PASSWORD - [ ] macOS Notarization: Requires
APPLE_API_ISSUER,APPLE_API_KEY, and the contents of the corresponding private key