Introduction¶
When developing with DSH Web, opening the workbench each time requires launching a terminal, navigating to the project directory, and running dsh web, which disrupts the workflow. dsh-launcher is a DSH plugin maintained by NoMindSama that automatically creates a desktop shortcut on Windows, enabling direct access to the work page with a double-click.
The plugin is installed through the dsh plugin command and does not modify the native features of DSH Web (such as chat, sidebar, or settings). It is responsible only for creating the desktop shortcut and orchestrating startup.
Core Features¶
- One-click access: Double-click the desktop shortcut to go directly to the DSH Web work page.
- Intelligent status detection: If DSH Web is already running, open the page directly; if it is not running, automatically start
dsh webin the working directory. - Automatic port detection: Prioritize reading the actual port listened to by DSH, with a fallback to
3080by default. - Configurable options: Supports configuring the working directory, shortcut name, icon, and desktop path.
- Native implementation: Relies only on Windows PowerShell included with the operating system, with no additional runtime required.
- Idempotent installation: Each time DSH starts, it checks and updates the shortcut, preventing duplicate icons.
- Platform compatibility: The current version only supports Windows; non-Windows platforms are safely skipped.
Installation and Enablement¶
Before installing, ensure the environment meets the following requirements:
* Operating system: Windows 10 or Windows 11
* Node.js version: >= 20
* Tool: pnpm is installed and available in PATH
Run the following command to install the plugin:
dsh plugin --profile web add github:NoMindSama/dsh-launcher
After installation, restart DSH Web:
dsh web
When DSH starts, it automatically creates a shortcut named DSH Workbench on the desktop.
Usage and Configuration¶
After installing and restarting DSH, double-click the DSH Workbench shortcut on the desktop to use it.
Configuration Example¶
You can configure the shortcut behavior through profile patch. For example, add the following to profiles/web/cordis.patch.yml:
- id: dsh-launcher
config:
workspace: "E:\\projects\\my-dsh-workspace"
port: 3080
shortcutName: "DSH 工作台"
dshCommand: "C:\\Users\\you\\AppData\\Roaming\\npm\\dsh.cmd"
desktop: "C:\\Users\\you\\Desktop"
Configuration options:
* workspace: specifies the working directory when dsh web is started.
* port: the default port for DSH Web; at runtime, the actual listening port is prioritized.
* shortcutName: the name of the desktop shortcut.
* dshCommand: the path to the dsh executable.
* desktop: the desktop directory path; supports OneDrive redirection.
Notes¶
- This plugin only takes effect on Windows. After installation, DSH copies the script and icon files to the
%USERPROFILE%\.dsh\launcher\directory. - The plugin runs with DSH process permissions and does not modify native DSH Web features such as chat, sidebar, or settings.
- If you need to change the icon, you can replace the
%USERPROFILE%\.dsh\launcher\icon.icofile.
Summary¶
dsh-launcher turns cumbersome terminal startup commands into simple desktop operations, lowering the barrier to using DSH Web. Implemented through native PowerShell, it is lightweight and stable. All source code and documentation are available on GitHub.