DeepSeek Harness (DSH) provides a Web UI for agent development, but each startup requires manually entering a command in the terminal, and manually closing the browser tab can easily cause the port to remain occupied. dsh-power-launch is a Windows client plugin. It enables one-click startup via a desktop shortcut and provides a secure exit function with secondary confirmation in the lower-right corner of the Web UI. This ensures the process exits with exit code 0 and frees up the port.

Core Features

This plugin provides the following capabilities:

  1. Automatic Desktop Shortcut: The plugin automatically creates a desktop shortcut with the official whale icon. Each time dsh web starts, the script idempotently checks and ensures the shortcut exists. If it is deleted or modified, it is restored automatically.
  2. Secure Exit in Web UI: A power button is displayed in the lower-right corner of the Web UI. Clicking it opens a confirmation window. After confirmation, the host process calls an API to exit with exit code 0 and automatically frees up the port, preventing conflicts on the next startup.
  3. Online Launcher: When the desktop shortcut is clicked, the launcher automatically checks for a new version of @deepseek-ai/dsh (using a China-based mirror). The startup process hides the background process and automatically opens the browser after startup is complete.

Installation

Install it using the official plugin command:

dsh plugin --profile web add dsh-power-launch

After installation, restart dsh web to take effect.

Typical Usage

Start the Service
During daily use, simply double-click the DeepSeek Harness Web shortcut on the desktop to start the Web UI.

Change the Port
If the default port is occupied, you can append a parameter to the end of the shortcut target path to change the port. For example, modify the shortcut target to:

dsh-launch.bat -Port 3081

Disable the Shortcut
If you do not want the desktop shortcut to be created automatically, set the following system environment variable:

DSH_POWER_LAUNCH_SHORTCUT=0

Configure the Mirror Source
If you need to use a specific NPM mirror, edit the launcher/dsh-launch.ps1 file in the package and modify the relevant parameters at the top.

Notes

  • Platform Limitation: This plugin currently supports the Windows platform only.
  • File Encoding Requirements: .bat files must retain CRLF line endings and pure ASCII encoding. .ps1 files must retain UTF-8 BOM encoding; otherwise, the script may fail to parse correctly.
  • Browser Behavior: Closing the tab is performed by the script calling window.close(). According to browser security policies, only tabs opened by the script itself are allowed to be closed. If the request is denied, the page silently becomes a dark blank.