Development & Runtime

dsh-desktop

Yuel25/dsh-desktop · ★ 2

Yuel25

A Windows desktop client for DeepSeek Harness.

License
MIT
Added
2026-08-16
Maintenance
active
Install kind
github
Manifest details
Manifest status
Not verified
Manifest path
-
Manifest checked
2026-08-19
Lifecycle scripts
None found

Static manifest checks report declarations only; they are not compatibility or security review.

安装

dsh plugin --profile web add github:Yuel25/dsh-desktop

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. Features
  2. Current status
  3. Quick start
  4. Switching profiles
  5. Settings and diagnostics
  6. Development
  7. Architecture
  8. Security
  9. Roadmap
  10. Contributing
  11. License and brand assets

[!IMPORTANT] This is an unofficial community project. It is not affiliated with, endorsed by, or sponsored by DeepSeek.

Features

  • Starts and manages dsh web without a console window
  • Hosts the DeepSeek Harness Web UI in an Electron window
  • Provides a custom frameless title bar, system tray, and single-instance behavior (the title bar shows the active profile), with a minimal tray menu
  • Safely restarts the desktop app and its owned DSH service from the system tray
  • Offers a persistent black or white title bar selectable in settings; startup screens, loading indicators, and error guidance follow the same preset
  • Switches DSH profiles in settings (scans ~/.dsh/profiles), restarting only the DSH service
  • Opens any profile in its own window so several profiles can run in parallel on separate ports
  • Built-in settings window: appearance and language, launch-at-login (optionally hidden), DSH port, and profile management
  • Built-in log viewer and one-click diagnostics copy (app version, dsh version, active profile, …)
  • Checks for updates at startup; a download entry appears in the tray when a new version is available
  • Automatically recovers from DSH service and renderer crashes and reports the outcome through system notifications
  • Attaches to an existing service on 127.0.0.1:3080, identifying its profile first and prompting on mismatch
  • Shows an install guide with a retry button when the dsh command is missing
  • Bilingual UI and notifications (Chinese/English), following the system locale or set manually in settings
  • Keeps running in the tray and cleans up DSH processes owned by the app on exit
  • Captures DSH stdout/stderr logs (per-instance files for profile windows)
  • Produces a Windows NSIS installer

Current status

The app currently requires:

  • Windows x64
  • The DeepSeek Harness dsh command installed on Windows and available on PATH

The DSH runtime is not bundled; the app starts the existing DSH installation on Windows.

Quick start

Prepare DeepSeek Harness on Windows:

npm install -g @deepseek-ai/dsh
dsh --version

Download the Windows installer from GitHub Releases, install it, and launch it.

If DSH is already listening on 127.0.0.1:3080, the app identifies its profile and attaches to it (prompting first on a profile mismatch). Otherwise, it launches DSH directly:

dsh --profile web --no-open

Switching profiles

The Profile section of the settings window lists every directory under ~/.dsh/profiles that contains a cordis.yml. After selecting one:

  • Only the DSH process owned by the app is restarted; the desktop app keeps running.
  • The choice is saved to settings.json in the user data directory and reused on the next launch.
  • If the port is held by an externally started DSH, the app cannot switch its profile and keeps the previous selection after showing a warning.

The "New window" button next to each non-active profile starts a dedicated DSH instance for it (on an automatically assigned free port) in its own window; closing that window stops the instance. Their logs are written to dsh.<profile>.stdout.log / dsh.<profile>.stderr.log.

Settings and diagnostics

Settings use a light sidebar layout with separate pages for each category, visual title bar previews, and save feedback. Navigation and content scroll independently in smaller windows.

The tray menu keeps only high-frequency actions (open, open in browser, settings, restart, quit); everything else lives in the settings window:

  • Appearance: black or white title bar and the UI language, applied immediately.
  • Startup: launch at login (optionally hidden to the tray with DSH starting in the background) and the DSH port (applies after an app restart).
  • Profile: switch the main window's profile or open other profiles in new windows.
  • Logs: built-in viewer for dsh output, errors, the recovery log, and per-profile-window logs, plus a shortcut to the logs folder.
  • Diagnostics: one-click copy of the app version, dsh version, active profile, active port, and configured port for issue reports.
  • Update: manual update check with a link to the releases page. An automatic check also runs at startup and notifies you when a new version is available.

DSH output logs rotate during continuous writes at 5 MiB, keeping up to three backups per log. When the directory exceeds 50 MiB, old backups are pruned while active logs are preserved. Settings are written through a temporary file replacement; failed saves report an error, restore the previous in-memory configuration, and retain unsaved port input.

Development

pnpm install
pnpm run dev

[!NOTE] pnpm run dev and pnpm run preview automatically invoke scripts/prepare-runtime.mjs to ensure the Electron runtime binary is available. In restricted network environments, set ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/". You can also run pnpm run prepare:runtime manually to verify or pre-download the binary.

Available checks and builds:

pnpm run prepare:runtime # Verify and prepare Electron binary
pnpm run typecheck       # TypeScript checks
pnpm run test            # Unit and lifecycle tests
pnpm run build           # Production build
pnpm run check           # Typecheck + tests + build
pnpm run dist            # Windows NSIS installer packaging

Installer artifacts are written to release/ and are not committed.

Architecture

The Electron main process owns the window, tray, and DSH child-process lifecycle. At startup it probes 127.0.0.1:3080, identifies the profile of an existing healthy service from its command line and attaches to it (or starts dsh --profile <name> --no-open on Windows when the port is free). Once healthy, the window navigates from the local loading screen to the DSH Web UI.

For DSH versions that require browser authentication, the desktop client reads the launch URL from its child process and authenticates automatically. Each profile window and restarted instance uses its own launch URL. HTTP 401/403/404 responses are not considered ready. If an externally started DSH requires authentication and the desktop session is not already authorized, stop that instance and retry so the desktop client can launch the service.

Security

  • DSH binds to 127.0.0.1 by default.
  • Node.js integration is disabled in the renderer and context isolation is enabled.
  • dsh-desktop's own bridge APIs (such as the login-item settings) are exposed only to the local loading page, not to the hosted DSH web UI.
  • External links open in the system browser.
  • Uninstalling the app does not remove ~/.dsh or DSH session data.

See SECURITY.md for vulnerability reporting guidance.

Roadmap

  • Add DSH runtime diagnostics
  • Add a settings and runtime diagnostics UI
  • Add signed releases and automatic updates
  • Complete installer, upgrade, and uninstall testing

Contributing

Read CONTRIBUTING.md and run pnpm run check before submitting changes.

License and brand assets

The project code is licensed under the MIT License. The DeepSeek Harness website icon is excluded from the MIT license; see THIRD_PARTY_NOTICES.md.