
DSH Mac Desktop
☆ 1DeepSeek Harness plugin: open the Web GUI in a native macOS desktop window (SwiftUI + WKWebView).
Get this plugin
Review the source, then continue to the publisher.
dsh plugin add dsh-mac-desktop@latestAbout this plugin
Source snapshot 8/13/2026dsh-mac-desktop
English | 中文
A DeepSeek Harness plugin that
opens the Web GUI in a native macOS desktop window — a thin SwiftUI +
WKWebView shell. The page it renders is the exact same Web GUI served by
dsh web, so the look and feel are 100% the Web UI, plus native window chrome
(title bar, toolbar, Dock icon, Cmd+R). The bundled DshMac.app also runs
standalone: double-click it and it auto-launches the server if none is up.
Everything is a plugin: this package is a bundle (
dsh.bundle→ acordis.patch.ymlthat inserts one host-plane plugin row). On activation the row waits for thewebServerservice, then spawns the bundled app; on unload it kills the window again, so stop / update / remove leave no stray process.
Install
From GitHub
dsh plugin --profile web add github:bitterSmilezzz/dsh-mac-desktop
dsh web # a native window opens alongside the Web GUI
Pin a commit for reproducible installs:
dsh plugin --profile web add github:bitterSmilezzz/dsh-mac-desktop#<sha>
From a local checkout
dsh plugin --profile web add ./dsh-mac-desktop
To remove it:
dsh plugin --profile web remove dsh-mac-desktop
Only macOS opens a window; on other platforms the plugin row is a no-op.
How it works
dsh --profile web (dsh-base + dsh-web-app + dsh-mac-desktop)
└─ webServer listens (3080)
└─ desktop-runner injects webServer
└─ Loader settles → spawn DshMac.app --url http://127.0.0.1:<port>
└─ WKWebView renders the Web GUI
- The window URL is derived from
ctx.webServer.port, so--port 8080is followed automatically. - The app watches its parent pid: if
dshis killed hard (SIGKILL, no disposer runs), the window exits on its own within ~2s. Normal shutdown is handled by the plugin disposer (terminateOnDispose). target="_blank"/window.openlinks open in your default browser.
Standalone desktop app
native/build/DshMac.app also works as a double-click app. On launch it checks
the configured URL (default http://127.0.0.1:3080); if no server answers it
spawns dsh web (see Settings) and connects once the port is up, then stops the
server it started when you quit. Configure the URL, launch command, working
directory, and auto-launch in the app's Settings (Cmd+,).
The server it spawns gets DSH_MAC_DESKTOP_MANAGED=1, which the plugin row reads
so it does not open a second window for a server the app itself started.
Configuration
The row is configurable from cordis.yml (a later layer replaces the whole
config, so restate every field you keep):
- id: desktop-runner
config:
enabled: true # master switch
terminateOnDispose: true # kill the window when the plugin unloads
url: http://127.0.0.1:3080 # optional override (default: derived from webServer.port)
appPath: /path/to/DshMac.app/Contents/MacOS/DshMac # optional (default: bundled)
Layout
dsh-mac-desktop/
├── package.json # dsh.bundle → cordis.patch.yml
├── cordis.patch.yml # inserts the desktop-runner row
├── index.js # host-plane plugin (plain ESM, no build step)
├── LICENSE
├── native/ # the SwiftUI + WKWebView shell
│ ├── Package.swift
│ ├── Sources/DshMac/
│ ├── Resources/ # Info.plist, fish.svg, AppIcon.icns
│ ├── scripts/ # make-app.sh, make-icon.sh
│ └── build/DshMac.app # prebuilt universal binary, committed & shipped
└── README.md
Rebuilding the native app
The bundled binary is a universal Mach-O (arm64 + x86_64), so it runs on both Apple Silicon and Intel Macs. To rebuild from source (requires Xcode command line tools):
cd native && ./scripts/make-app.sh
Publishing to GitHub
This repository is publish-ready as an installable bundle:
- No build step is required to install.
index.jsis plain ESM, and the prebuiltnative/build/DshMac.appis committed, so a git install fetches everything it needs (git installs fetch the whole repo; thefilesfield only matters fornpm pack/ npm publish). - Because there is no
preparescript, users do not need the pnpmallowBuildsstep. If you later add one (e.g. to rebuild Swift on install), users must allowlist it — see the harness publish guide. - Add the
dsh-plugintopic to the repository for discoverability.
To create and push the repo:
git init
git add .
git commit -m "dsh-mac-desktop: native macOS desktop window plugin"
gh repo create dsh-mac-desktop --public --source=. --push
Notes
- The
native/build/DshMac.appcommitted here is the shipped artifact;filesinpackage.jsonincludes it so an npm publish also carries the binary with no build step. - macOS 14+ only (the WKWebView shell uses SwiftUI APIs available from 14.0).