Back to directory

dsh-wsl

In a curated listMaintenance: Active

xiny11451/dsh-wsl

A model-facing WSL tool plugin for DeepSeek Harness (DSH). It lets an agent run Linux commands through wsl.exe directly — no hand-written .sh scripts or pwsh wrappers.

View on GitHub
$ dsh plugin add --profile <profile> dsh-wsl-tool

16

stars

3

forks

JavaScript

Language

MIT

License

2026-08-26

Created

2026-11-23

Last push

MIT-licensed DSH tool plugin, still released (v2.3.0): it lets the agent drive a real WSL Linux environment from a Windows DSH session, with eleven `wsl*` tools, a left-sidebar switch panel, background jobs and file tools inside the distribution.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-24

License

MIT

01What can it help you accomplish?

  • Run Linux commands from a Windows DSH session without writing .sh scripts or pwsh wrappers

    The `wsl` tool spawns `wsl.exe -e bash -lc` and returns stdout/stderr with exit-code, timeout and truncation markers; a script over the 32767-character command-line limit is fed on stdin, and output past the window keeps its tail plus a spill file holding the complete stream

    Developers who work on Windows while the project needs a real Linux toolchain

  • Keep one shell across steps for a long build or an interactive program

    `wsl-term` runs the command in a private WSL shell, logs every command with its exit code, shows a subtask count above the composer, and gives the keyboard back as soon as you name one of your own terminals

    People watching a build go by, or driving a program the agent has to keep alive between steps

  • Find out whether a checkout's tooling works in this distribution before blaming the command

    `wsl-env` reports distro, kernel, CPU/memory/disk, systemd, GPU and mounted drives; `wsl-doctor` reads the project manifests and marks each need MISSING or WINDOWS (a Windows binary reached through the interop PATH) with a suggested next step

    Anyone who just moved a Windows project into WSL and is misled by interop PATH binaries

  • Read, write, edit, grep and glob files inside the distribution

    Five tools run the operation through the same `wsl.exe` launcher: an atomic write that keeps the mode, an edit that refuses anything but one unique match, grep grouped by file with line numbers, and glob paths in modification-time order

    Agents editing files under `/home` or `/mnt/...`, where Windows' own file tools cannot write

02How to install into DeepSeek Harness

Prerequisites

  • Windows with WSL installed and `wsl.exe` reachable; every call targets the caller's `distro`, else `DSH_WSL_DISTRO`, else the system default distribution
  • DSH 0.2.1-rc.2 or newer — the manifest declares `>=0.2.1-rc.2`, and the terminal tool no longer supports DSH ≤ 0.2.0
  • `@deepseek-ai/dsh-tool-jobs` in the preset's composition if background jobs are wanted
  • `@deepseek-ai/schemastery` in the profile if the settings switches are wanted; without it the tools still run on their defaults

Installation steps

  1. 01

    Install the npm package `dsh-wsl-tool` into your profile: `dsh plugin add --profile <profile> dsh-wsl-tool` — the package is `dsh-wsl-tool`, not `dsh-wsl`, and a checkout install uses the `file:` form

    $ dsh plugin add --profile <profile> dsh-wsl-tool

  2. 02

    Do not also list `tool-wsl` in a preset: the bundle's `cordis.patch.yml` inserts that row process-wide on load, and a second registration fails with `tool "wsl" is already registered in this scope`

  3. 03

    Restart DSH so the bundle is imported once

  4. 04

    Optional: to open WSL in the sidebar terminal too, copy the entry from `extras/terminal-wsl.patch.yml` into the profile's `cordis.patch.yml`

Verify the integration

  • After the restart a WSL entry sits in the left sidebar, with one switch per feature: `wsl-term` has none, `wsl-doctor` and `wsl-bootstrap` start off
  • The tools are registered process-wide, so `wsl` is callable from any session without a line in the preset

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH tool plugin: the plugin is a cordis module that injects the host `tools` and `subprocess` registries, and its bundle's `cordis.patch.yml` inserts the `tool-wsl` row itself, so the eleven `wsl*` tools and the left-sidebar WSL panel are registered process-wide with no preset entry.

  • Eleven `wsl*` tools, each with its own switch

    A tool call from any agent preset→`wsl`, `wsl-path`, `wsl-env`, `wsl-doctor`, `wsl-bootstrap`, `wsl-term`, `wsl-read`, `wsl-write`, `wsl-edit`, `wsl-grep`, `wsl-glob`; `wsl-doctor` and `wsl-bootstrap` ship off by default

    Every call really starts `wsl.exe` and runs in the distribution as your own user
  • Command execution facts: exit code, timeout, truncation, background job

    `command`, plus optional `workdir`, `env`, `stdin`, `timeoutMs`, `runInBackground`→stdout/stderr capped at the configured window with the tail kept and the full stream in a spill file, a per-call deadline (10 minutes by default, 24 hours ceiling), a job id for background work

    A background job outlives the call: it is read with `job_output` and stopped with `job_kill`
  • Capability probe and project doctor

    An optional `distro`, and for `wsl-doctor` an optional Linux `workspace`→WSL1 or WSL2, systemd, cgroup version, GPU passthrough, docker, mounted drives, wsl.conf and .wslconfig, plus a MISSING / WINDOWS / usable verdict per project need with next steps

  • Toolchain bootstrap from a fixed recipe list

    `recipes` out of `node`, `pnpm`, `python`, `build`, `tools`, plus `dryRun`→A plan of what is already satisfied and what apt itself would change, then the installation; a failing step stops the run

    `dryRun` defaults to `true`, so nothing is installed until the caller turns it offPackages are installed as root inside the distribution (Node.js LTS into `/usr/local`)
  • A stateful shell with subtask records

    `run` with an optional `subtask`, plus `read`, `input`, `interrupt`, `close`, `subtask-done`→One private shell per piece of work, commands logged with exit codes, a subtask count above the composer, and collaboration in a terminal you already have open

    Subtask records live in memory for the current DSH run and a restart clears themA terminal you opened stays read-only while the model works in it until you click 接管输入Long output comes back as its tail, with the complete text in a file the result names
  • File tools inside the distribution

    Linux paths such as `~/project/src/main.js`, plus `offset`/`limit`, `oldString`/`newString`, `pattern`/`include`, and `asRoot` on four of the five→Host-shaped read and write answers, a one-line edit summary, grep matches grouped by file with line numbers, glob paths in modification-time order

    `wsl-write` replaces only a regular file and refuses a FIFO, socket or device node`asRoot: true` needs the panel's 管理员模式 switch on, and reads or edits what your user could not open
  • Left-sidebar panel and configuration precedence

    Panel switches, the profile patch, or environment variables→One switch per tool with a one-line explanation, applied live without a restart; values resolved as plugin configuration, then the environment, then the built-in defaults

    The 「WSL 终端启动路径」 field rewrites one `args` line of your profile's `cordis.patch.yml`, with a backup first and a read-back check

04Who is it for? When not to use it?

Good for

  • Developers who work on Windows while the project needs a real Linux toolchain
  • People watching a build go by, or driving a program the agent has to keep alive between steps
  • Anyone who just moved a Windows project into WSL and is misled by interop PATH binaries
  • Agents editing files under `/home` or `/mnt/...`, where Windows' own file tools cannot write

Not for

  • A `wsl` call runs below DSH's sandbox: the `workspace-write` file policy does not confine it, so it can write anywhere the Linux side can and anywhere under `/mnt/<drive>` that Windows permits. What is left is a deterministic destructive-command guard, which the README calls a refusal list rather than a kernel boundary.
  • It needs Windows with WSL and `wsl.exe`; the distribution is the caller's `distro`, else `DSH_WSL_DISTRO`, else the system default with no hardcoded name, and an unknown distro is an error. The manifest declares `dsh >= 0.2.1-rc.2`, and the terminal tool no longer supports DSH ≤ 0.2.0.
  • A project kept on a Windows drive stays on a 9p mount with Windows filesystem semantics: POSIX permissions do not stick by default, names are case-insensitive, inotify receives no events at all, and writes are several times slower than on ext4.
  • Two optional pieces are real dependencies: background jobs need `@deepseek-ai/dsh-tool-jobs` in the preset composition — the call fails with that instruction instead of falling back to the foreground — and the settings switches need `@deepseek-ai/schemastery`, without which only the panel is missing.
  • Privileged and destructive work is gated rather than free: a recursive delete and the device/power tools need `allowDangerous: true`, `asRoot: true` is refused unless the panel switch is on instead of being downgraded quietly, and a password passed through `stdin` is recorded in the session transcript.

05Compatibility, maintenance and safety notes

  • A `wsl` call runs below DSH's sandbox: the `workspace-write` file policy does not confine it, so it can write anywhere the Linux side can and anywhere under `/mnt/<drive>` that Windows permits. What is left is a deterministic destructive-command guard, which the README calls a refusal list rather than a kernel boundary.
  • It needs Windows with WSL and `wsl.exe`; the distribution is the caller's `distro`, else `DSH_WSL_DISTRO`, else the system default with no hardcoded name, and an unknown distro is an error. The manifest declares `dsh >= 0.2.1-rc.2`, and the terminal tool no longer supports DSH ≤ 0.2.0.
  • A project kept on a Windows drive stays on a 9p mount with Windows filesystem semantics: POSIX permissions do not stick by default, names are case-insensitive, inotify receives no events at all, and writes are several times slower than on ext4.
  • Two optional pieces are real dependencies: background jobs need `@deepseek-ai/dsh-tool-jobs` in the preset composition — the call fails with that instruction instead of falling back to the foreground — and the settings switches need `@deepseek-ai/schemastery`, without which only the panel is missing.
  • Privileged and destructive work is gated rather than free: a recursive delete and the device/power tools need `allowDangerous: true`, `asRoot: true` is refused unless the panel switch is on instead of being downgraded quietly, and a password passed through `stdin` is recorded in the session transcript.
  • Path translation has edges: a Windows program started through interop needs `translatePaths: false`, a UNC path naming another distribution is left untouched, and `DSH_WEB_URL` is deliberately not forwarded because in the default NAT mode WSL cannot reach Windows loopback.
2026-08-262026-11-08v2.3.0

MIT (repository metadata; the README states no licence section) · actively maintained (latest release v2.3.0 on 2026-11-23, last push 2026-11-08)

06Frequently asked questions

How do I install it in DeepSeek Harness?

Add the npm package `dsh-wsl-tool` to your profile — `dsh plugin add --profile <profile> dsh-wsl-tool`, or a `file:` path to a checkout — then restart DSH. Do not also list `tool-wsl` in a preset: the bundle inserts that row process-wide on load and the second registration fails.

What appears after a successful install?

A WSL entry in the desktop app's left sidebar whose panel carries one switch per feature, and the tools available to every agent preset without further wiring. `wsl-doctor` and `wsl-bootstrap` start off, and `wsl-term` has no switch at all.

Does DSH's file sandbox contain these commands?

No. A `wsl` call runs below the sandbox: it spawns `wsl.exe` through the host subprocess service, so a workspace-write policy does not confine it and it can write anywhere the Linux side can. The destructive-command guard is a refusal list, not a kernel boundary.

What do I need besides Windows and WSL?

DSH 0.2.1-rc.2 or newer — the manifest declares `>=0.2.1-rc.2` and the terminal tool refuses older builds — plus `@deepseek-ai/dsh-tool-jobs` in the preset for background jobs, and `@deepseek-ai/schemastery` if you want the switches.

Why not use the platform's own read, grep and glob on the WSL share?

Windows cannot write that share through its file tools, and every round trip through it pays the 9p latency. The plugin runs read, write, edit, grep and glob inside the distribution through the same launcher, so paths come back as ordinary Linux paths.

08Data and sources

  • Author-claimedgithub.comfd7ae70cc47c…

    A model-facing **WSL** tool plugin for DeepSeek Harness (DSH). It lets an agent run Linux commands through `wsl.exe` dir…

  • Author-claimedgithub.comfd7ae70cc47c…

    The plugin registers eleven tools. Each has a switch of its own except `wsl-term`, and `wsl-doctor` and `wsl-bootstrap`…

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-24. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.