dsh-desktop
开发工具 活跃维护

dsh-desktop

koompi/dsh-desktop

Electron构建的桌面端外壳,直接调用已发布的配套命令行工具作为后台进程运行,无需用户手动配置本地命令行环境,打开应用即可直接使用对应功能,操作简单高效。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Shell
主要语言
None
开源协议
89 KB
仓库大小
22 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:koompi/dsh-desktop
git clone https://github.com/koompi/dsh-desktop.git
git clone git@github.com:koompi/dsh-desktop.git
README.md main

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

Path Purpose
src/main.ts Electron main process: sidecar spawn, window, shutdown
runtime/package.json the single upstream pin
scripts/fetch-node.sh verified download of the bundled Node binary
scripts/update-upstream.sh bump the upstream pin
scripts/build-appimage.sh full AppImage build
scripts/install-local.sh per-user install of the built AppImage
electron-builder.yml packaging: 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.