Desktop app

Biscuit for macOS, Windows and Linux is a Tauri v2 shell (apps/desktop) around the web app's build. It shares the web app's version and changelog.

The desktop app
Tauri v2 shellRust, ~4 MBSystem webviewWebKit · WebView2apps/web buildshipped insideGo APIVITE_API_URLChat proxyVITE_CHAT_URLUpdater: latest.jsonbiscuit-releasesCORS for tauri://signed updates
Saved or publishedOutside serviceHover or tab to a box to trace it

How it's built

  • No bundled browser. The apps/web build ships inside the app and renders in the system webview: WebKit on macOS and Linux, WebView2 on Windows. The macOS app is about 4 MB and idles around 250 MB of memory, most of it the web app itself.
  • Small release binary. The release profile uses LTO, one codegen unit, size optimisation and stripped symbols.
  • No white flash. The window paints Biscuit's dark background (#151614) before the page loads. It opens at 1280 wide and won't shrink below 900.
  • Local files, no service worker. The service worker is off inside the app; the files are already on disk.
  • One copy at a time. The single-instance plugin brings the open window forward instead of starting a second copy. biscuit:// links open the app (registered by the bundle on macOS, at runtime on Windows and Linux).

The crowned Biscuit sits in the macOS menu bar (src-tauri/src/tray.rs, icon icons/tray.png as a template image). Clicking it opens the quick-ask bar, a borderless, always-on-top window loading apps/web/public/quick.html, a static page so it opens instantly. Enter calls the quick_send command, which shows the main window, opens that bot's chat and sends the message there. Escape (quick_hide) or clicking elsewhere hides it. Right-click for Ask Biscuit…, Open Biscuit and Quit.

What it talks to

Call Goes to Set by
API (sign-in, bots, chats, live sync) VITE_API_URL build-time env; add tauri://localhost and http://tauri.localhost to the API's BISCUIT_CORS_ORIGINS
Live model replies without the API VITE_CHAT_URL the deployed chat proxy, which allows the app's origins
Updates https://github.com/nibir404/biscuit-releases/releases/latest/download/latest.json tauri.conf.json → plugins.updater.endpoints

Native permissions

Native features are opt-in through Tauri capabilities (src-tauri/capabilities/default.json):

Permission Why
core:default The window and basic app events.
updater:default, process:allow-restart Download a signed update and restart into it.
opener:allow-open-url (http://*, https://*) Open links in your own browser.
dialog:default Native confirm and file dialogs.
notification:default A system notification when a bot waits for your OK while the app is in the background.
core:window:allow-request-user-attention, allow-set-focus, allow-unminimize, allow-show Bounce the Dock icon and bring the window back for that request.

Commands for bots' browsers: browser_list (installed Chromium-based browsers), browser_launch (start one with its own Biscuit profile and loopback DevTools) and local_set_browser. See COMPUTERS.md.

Run and build

npm install
npm run desktop          # dev window with hot reload (needs Rust)
npm run desktop:build    # release build for this machine

Releases and auto-update

From change to release
Notes under[Unreleased]Pull request+ CI checksSquash mergeto mainnpm run releasevX.Y.Z tag +GitHub Releasenpm runrelease:desktopbiscuit-releaseslatest.json + DMGnpm runrelease:apiservices/api/vX.Y.Zghcr.io image:X.Y.Z · :latestInstalled appsupdate themselvesweb · desktop · phoneAPIsignedCI builds
You or your deviceCheck or decisionSaved or publishedHover or tab to a box to trace it

Both release scripts refuse to run off main, with a dirty tree, behind origin, with an existing tag or with empty Unreleased notes.

  1. Cut the app release first: npm run release -- patch|minor|major bumps web, desktop and phone together, tags vX.Y.Z and publishes the GitHub Release.
  2. Then npm run release:desktop builds the signed app with the updater key (TAURI_SIGNING_PRIVATE_KEY, or ~/.tauri/biscuit-updater.key). That produces Biscuit.app.tar.gz, its .sig and the .dmg.
  3. It writes latest.json (version, notes, and per platform the download URL and signature) and creates release vX.Y.Z on the public releases repository (UPDATES_REPO, default nibir404/biscuit-releases) with the update, the DMG and latest.json, marked latest.
  4. The DMG is also attached to the app's release in this repository.
  5. Installed apps poll latest.json, verify the signature against the public key in tauri.conf.json, download and restart.

Signing key. Updates are signed with the minisign key whose public half is in tauri.conf.json (key ID FE95BAD1204B58CD, replaced in 0.52.3 after the original was lost). Keep the private key backed up: an app only accepts updates from the key it shipped with, so a new key means every user reinstalls once from the DMG.

What a release ships with. The script overrides apps/web/.env.local: no VITE_GROQ_API_KEY, VITE_API_URL from DESKTOP_API_URL (empty means the sign-in screen asks for a server or the demo), and VITE_CHAT_URL from DESKTOP_CHAT_URL (default https://biscuits-bot.vercel.app/api/chat). It refuses localhost addresses and checks the built files for Groq and Google keys before uploading anything.

--dry builds and writes latest.json without uploading anything.

The macOS installer. The DMG opens a Biscuit-styled window (660 wide) with its own background (src-tauri/dmg/background.png) and the usual drag-to-Applications layout.