Back to home@koompi

dsh-desktop

Electron desktop shell for DeepSeek Harness: runs the published dsh CLI as a sidecar

Stars
0
Language
Shell
Created
Sep 2, 2026
Updated
Sep 2, 2026

Introduction

DSH Desktop

Electron shell for DeepSeek Harness. It runs the published dsh CLI as a sidecar and shows dsh web in a window. Nothing upstream is forked or patched.

How it works

  1. A bundled Node 24 runs runtime/node_modules/@deepseek-ai/dsh/lib/bin.js web --port 0 --no-open.
  2. dsh web binds 127.0.0.1 on an OS-chosen port and prints dsh web: http://127.0.0.1:<port>/?token=....
  3. The main process loads that URL in a BrowserWindow. The token becomes an HttpOnly cookie exactly as it does in a browser, so upstream's loopback bind, login and origin fence are unchanged.
  4. Closing the window sends SIGTERM to the sidecar and waits for it to exit before Electron quits.

Session data lives in ~/.dsh (or $DSH_HOME), shared with the dsh CLI. DSH_TELEMETRY_DISABLED=1 in the environment turns upstream's feedback telemetry off.

Build

Requires Bun, jq, curl, and network access to nodejs.org, npmjs.org and GitHub.

bun install                 # Electron + electron-builder
(cd runtime && bun install) # the upstream dsh runtime
scripts/build-appimage.sh   # fetches Node 24, compiles src/main.ts, builds release/*.AppImage

Install the built AppImage for the current user (launcher on PATH, hicolor icons, desktop entry; re-run after a rebuild to upgrade):

scripts/install-local.sh

Run from source without packaging:

scripts/fetch-node.sh
bun run start

Pull updates from upstream

The whole upstream is one pinned dependency, @deepseek-ai/dsh in runtime/package.json.

scripts/update-upstream.sh          # follow the "alpha" npm dist-tag
scripts/update-upstream.sh latest   # follow "latest"
scripts/update-upstream.sh 0.1.3    # pin an exact version
scripts/build-appimage.sh

The script rewrites the pin, reinstalls, and fails unless the installed CLI reports the target version. Commit runtime/package.json and runtime/bun.lock together. alpha is the default because upstream publishes prereleases there while latest lags.

Layout

PathPurpose
src/main.tsElectron main process: sidecar spawn, window, shutdown
runtime/package.jsonthe single upstream pin
scripts/fetch-node.shverified download of the bundled Node binary
scripts/update-upstream.shbump the upstream pin
scripts/build-appimage.shfull AppImage build
scripts/install-local.shper-user install of the built AppImage
electron-builder.ymlpackaging: Node and runtime ship as extraResources, outside the asar

Known limits

  • Linux AppImage only. Windows and macOS need a per-platform Node in scripts/fetch-node.sh and their electron-builder targets.
  • The app icon is Electron's default.
  • Native folder pickers in the harness use zenity or kdialog; without them the in-app browser picker is used.
  • Upstream is pre-release and its session format has no compatibility promise, so an upstream bump can refuse old ~/.dsh data.