When developing DeepSeek Harness (DSH) locally, maintaining instances in both Windows and WSL2 environments is a common scenario. Usually, you need to manually switch URLs between two terminal windows or copy and paste port addresses, which is cumbersome and error-prone. The following section introduces the dsh-env-switcher plugin, which allows you to directly switch between two running DSH instances in the Web UI without closing either one.

Core Features

  • Coexistence Mode: DSH servers on Windows and WSL2 run simultaneously without interfering with each other. The default ports are 3080 and 3081, respectively.
  • Web UI Entry: A new “Environment” tab is added to the Web UI, and an entry called “Running Environment” appears in the main column (middle column) of the sidebar, displaying the currently switchable Windows or WSL option.
  • Collapse Awareness: When the sidebar is collapsed, the entry is automatically hidden; it reappears when expanded.
  • Session Isolation: Each environment maintains independent session history.

Installation and Activation

Use the official command to install:

dsh plugin --profile web add dsh-env-switcher

If you have checked out the source code locally, use:

dsh plugin --profile web add file:/path/to/dsh-env-switcher

After installation, restart the server and force refresh the browser (Ctrl+F5 or Cmd+Shift+R).

Configuration Notes

All configuration items are optional. Default values suit a typical Windows + WSL2 environment. A configuration example in cordis.patch.yml is as follows:

- insert:
    - id: dsh-env-switcher
      name: dsh-env-switcher
      config:
        winPort: 3080        # Windows DSH 端口
        wslPort: 3081        # WSL DSH 端口
        wslDistro: Ubuntu-24.04
        wslNodeBin: /home/fsc/node-v24.17.0-linux-x64/bin
        wslLog: /home/fsc/dsh-web.log
        winLog: D:\deepseek-harness\logs\dsh-web-win.log
        winWorkingDir: C:\Users\61468

Environment Requirements

  • Operating System: Windows 10/11 + WSL2 + a Linux distribution (such as Ubuntu 24.04).
  • DSH Installation: DSH must be installed in both the Windows environment and the WSL environment.
  • Service Startup: The WSL instance must be started using the dsh web --port 3081 command.

Usage

In the “Running Environment” section of the Web UI sidebar, click the target environment (Windows or WSL). The system ensures that the corresponding server is running, then the current tab automatically navigates to the URL for that environment.

Summary

dsh-env-switcher integrates Windows and WSL2 environment switching through the Web UI. Combined with collapse awareness and independent session history, it improves the cross-environment development experience. The source code and update record are available on GitHub.