dsh-web-open: Print URL after `dsh web` is ready and open the browser

Preface

As an DSH plugin, @dawsondx/dsh-web-open solves a very specific problem: after dsh web starts successfully, users typically need to manually locate the GUI address and open a browser. This plugin combines these two steps into one: once dsh web is ready, it prints the full GUI URL and opens that URL in the default browser.

Below, we introduce its positioning, features, installation methods, typical usage, and limitations.

Plugin Positioning

@dawsondx/dsh-web-open is a DSH bundle maintained by dawsondx, licensed under MIT, with version 0.1.2 in package.json.

Its core capabilities are:

  • Prints the full GUI URL once dsh web is ready
  • Automatically opens that URL in the default browser
  • Supports cross-platform Windows / macOS / Linux
  • Zero runtime dependencies
  • Fail-safe: apply() never throws errors; it degrades to a no-op when the service is unavailable, printing only a warning
  • Correctly handles dsh web --port 0 (system-assigned port)

Its runtime requirements are:

  • Node.js >=18
  • Peer dependency: @deepseek-ai/cordis >=4.0.0

Prerequisites

Before installation, confirm the following conditions:

  1. dsh is installed

  2. A profile has been initialized, and dsh web has been run at least once

  3. pnpm is available in PATH

  4. Node.js version is >=18

  5. @deepseek-ai/cordis >=4.0.0 can be loaded in the environment

Installation and Activation

Install from npm:

dsh plugin --profile web add @dawsondx/dsh-web-open

You can also install directly from GitHub:

dsh plugin --profile web add github:dawsondx/dsh-web-open

After installation, run:

dsh web

The expected behavior is to print the full GUI URL and open the default browser.

You can inspect the configuration output with:

dsh web --dump-config

Typical Usage

Start and automatically open the browser

dsh web
DSH_OPEN_BROWSER=0 dsh web

This environment variable is suitable for temporarily disabling auto-open behavior, as well as for headless / CI environments.

Using a system-assigned port

dsh web --port 0

The plugin supports this mode and correctly opens the final usable URL.

Configuration Options

The default behavior is to print the URL and open the browser.

The following configuration options can be overridden via the profile’s cordis.patch.yml:

  • open
  • printUrl
  • url
  • retryAttempts
  • retryIntervalMs

For example, if you only want to keep printing the link without opening the browser, you can set:

open: false
printUrl: true

You can also temporarily disable auto-open using the environment variable:

DSH_OPEN_BROWSER=0 dsh web

Applicable Scenarios

This plugin is suitable for local development or daily use of dsh web, especially for users who want to reduce the repetitive steps of “copying the URL after startup, switching to the browser, and pasting the address.”

It supports Windows / macOS / Linux and retains a switch to disable auto-open in scenarios without a graphical environment, such as CI.

The plugin runs with the current dsh process’s permissions; it is recommended to review the source code and license before installation. This repository is licensed under MIT.

Known Limitations

  1. On Linux systems without a graphical environment (servers / containers / WSL without DISPLAY), the browser may not open, but dsh web will still run normally and print the link.

  2. It is recommended to disable auto-open in headless / CI environments:

DSH_OPEN_BROWSER=0 dsh web
  1. If the official dsh renames the loader / webServer services, the plugin will degrade by not automatically opening the browser without affecting startup.

  2. The plugin itself does not include functionality for updating the harness, nor does it include desktop shortcuts.

Updating and Uninstalling

For versions published to npm:

dsh plugin --profile web update

For versions installed directly from GitHub, updating requires re-running the install command:

dsh plugin --profile web add github:dawsondx/dsh-web-open

To update the harness itself, you can use:

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

To uninstall:

dsh plugin --profile web remove @dawsondx/dsh-web-open

Conclusion

The value of dsh-web-open is quite specific: once dsh web is ready, it merges “printing the full GUI URL” and “opening the default browser” into a single step, while retaining the ability to degrade gracefully on failure and to temporarily disable auto-open.

GitHub repository:

https://github.com/dawsondx/dsh-web-open

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye