Introduction

After dsh web starts, it usually requires visiting the local Web UI in a browser. dsh-open-browser handles this step in a plugin: when dsh web finishes starting and is ready to serve, it automatically opens the Web UI in the system’s default browser.

What is this

dsh-open-browser is a DSH plugin maintained by peach0x33a with an MIT license.

It targets local scenarios where dsh web is already being used, solving the step of “service is ready, but the browser still needs to be opened manually.” The package declaration is as follows:

name: dsh-open-browser
license: MIT
engines: node >=22
peerDependencies: @deepseek-ai/schemastery *
devDependencies: @deepseek-ai/schemastery ^3.18.1

The “zero runtime dependencies” here means no extra dependencies are introduced at runtime; peer uses @deepseek-ai/schemastery built into dsh for configuration validation.

Core Features

  • Zero runtime dependencies; only uses the built-in @deepseek-ai/schemastery from dsh for configuration validation.
  • Cross-platform support for macOS, Linux X11, Linux Wayland, Windows, and WSL.
  • Headless safety: On Linux without DISPLAY/WAYLAND_DISPLAY and not in WSL, it silently skips opening and prints a single line of prompt.
  • Precise timing: Hits the same ready point as the web-app printing the URL line (after the Loader tree settles), so it can also capture OS-assigned ports with --port 0.
  • Non-blocking shutdown: The opener child process is detached + unref, so Ctrl-C/SIGTERM shutdown is not affected.
  • Supports overriding open and delayMs configuration via cordis.patch.yml in the profile, line by line ID.

Installation and Enablement

  1. Install to the web profile:
dsh plugin --profile web add dsh-open-browser
  1. Alternatively, install directly from git:
dsh plugin --profile web add github:peach0x33a/dsh-open-browser
  1. Start the web service:
npx @deepseek-ai/dsh web

After starting, the terminal will print:

dsh web: http://127.0.0.1:3080
dsh-open-browser: opened http://127.0.0.1:3080 via xdg-open

The first line indicates dsh web has printed the accessible address, and the second line indicates the plugin opened the address via the system’s default browser.

Configuration

You can override the configuration open and delayMs via cordis.patch.yml in ~/.dsh/profiles/web/cordis.patch.yml:

- id: dsh-open-browser
  config:
    open: false
    delayMs: 0

In the example, open: false means automatic opening is disabled, and delayMs: 0 means a 0 millisecond delay.

Platform and Considerations

  • Supported platforms include macOS, Linux X11, Linux Wayland, Windows, and WSL.
  • On headless Linux, if there is no DISPLAY/WAYLAND_DISPLAY and it is not WSL, the browser will not be opened, and only the skip prompt will be printed.
  • If Linux $BROWSER is set to a parameterized form (e.g., firefox %s), this branch will fail and print console.error; it is best to not set $BROWSER and let xdg-open handle it.
  • If a minimalist Linux environment is missing xdg-open, an error line will be printed, but startup will not be affected; you can install xdg-utils or set $BROWSER.
  • On Windows, if Start-Process fails due to no desktop session (e.g., services/SSH non-interactive), an error line will be printed, but startup will not be affected.
  • On WSL, if closing interop causes powershell.exe to be unreachable, an error line will be printed, but startup will not be affected.

Suitable Scenarios and Installation Notes

Suitable for developers using dsh web locally who want to open the Web UI directly after the service is ready. Also suitable for avoiding browser opening operations in headless environments.

Since the plugin runs with the current dsh process, you should check the source code, license, and plugin behavior before installing. This plugin is licensed under MIT, and the repository address is peach0x33a/dsh-open-browser.

Conclusion

The value of dsh-open-browser is to combine the readiness action of dsh web and the system default browser opening action into one plugin. Repository address: https://github.com/peach0x33a/dsh-open-browser