DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-plugin-wsl

c

dsh-plugin-wsl

Discovered

dsh plugin: run bash inside WSL from dsh (wsl_sh tool with exit code, timeout, truncation notice)

dsh-plugin-wsl

Run bash inside WSL from dsh. One tool, wsl_sh, with exit code, timeout and an honest truncation notice.

dsh on Windows can only run Windows-native commands. Most robotics / ML work is Linux-shaped — pip, colcon, nvidia-smi, systemd, apt — so the usual workaround is copying commands into another terminal by hand. This plugin closes that loop: the agent calls wsl_sh, gets stdout/stderr and a real exit code back, and keeps going.

$ uname -a && python3 -V
exit=0  duration=2631ms
--- stdout ---
Linux DESKTOP 6.6.87.2-microsoft-standard-WSL2 x86_64 GNU/Linux
Python 3.12.3
--- stderr ---
wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。

(The stderr line above is real: WSL warns about the proxy setup on every call. The plugin passes it through instead of hiding it — that warning is why a pip install is slow, and hiding it would cost you an hour of debugging.)

Install

# 1) add the package to a profile (forwards to pnpm inside the profile dir)
dsh plugin --profile web add github:cccjj55/dsh-plugin-wsl

# 2) enable the bundle: add the package name to dsh.profile.bundles
#    in $DSH_HOME/profiles/web/package.json
{
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-plugin-wsl"]
    }
  }
}

Restart the profile. No config required; optional keys are listed below.

Tool

parametertyperequiredmeaning
commandstringyesbash command to run
descriptionstringyes5–10 word description, shown in the UI
workdirstringnoLinux path to cd into (Windows paths are not translated)
timeoutMsnumbernokill after this long (default 120000)
distributionstringnoe.g. Ubuntu-24.04; defaults to the WSL default distro

Profile config (all optional):

# cordis.patch.yml
plugins:
  wsl:
    distribution: Ubuntu-24.04
    timeoutMs: 300000
    maxOutput: 20000

Design notes

  • UTF-8 only. wsl.exe prints its own diagnostics as UTF-16 while Linux programs print UTF-8. The plugin sets WSL_UTF8=1 before spawning so the two streams never mix into mojibake.
  • Truncation is reported, not silenced. Output is capped (default 20 000 chars) and the result says so. A truncated test log that looks complete is worse than an obviously truncated one.
  • Timeout kills the process and returns what was produced, with timedOut set, so the caller can decide whether a longer bound is worth it.
  • Fails loudly off Windows. On Linux/macOS it throws a message pointing at the built-in bash tool instead of surfacing a confusing spawn error.

Limitations

  • Non-interactive only: there is no PTY, so vim, sudo password prompts and anything that reads from a terminal will hang until the timeout.
  • Windows paths are not translated. Pass Linux paths (/home/you/...), or /mnt/c/... for Windows files.
  • Each call is a fresh wsl.exe (~0.2–2.6 s overhead). For many small commands, batch them into one bash -lc invocation.

Test

node test/smoke.mjs        # includes a real wsl.exe call (Windows)
node test/smoke.mjs --dry  # helper/contract checks only (any OS)

Roadmap

  • optional PTY mode for interactive tools
  • path translation helper (Windows ↔ WSL)
  • streaming output for long builds

License

MIT

Comments

Loading…

Similar plugins

dsh-bash-terminal

by MAXeaglet

DSH plugin: one shell tool that runs commands through PowerShell, Git Bash, or WSL on Windows, with a user-chosen default terminal in the Web UI settings.

Terminal & ClientsManifest valid

★ 24

↓ 197/wk

MIT

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-bash-terminal

DSH plugin: one shell tool that runs commands through PowerShell, Git Bash, MSYS2, or WSL on Windows, with a user-chosen default terminal in the Web UI settings. TypeScript rewrite of MAXeaglet/dsh-bash-terminal with working MSYS2/MINGW64 support.

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add dsh-bash-terminal-ts

by Dinosaur-MC

Multi-bash plugin for dsh. Add Git Bash / WSL Bash support for Windows.

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Aug 30, 2026

dsh plugin --profile web add dsh-win-multi-bash

by XINY11451

WSL tools for DSH: run Linux commands, convert Windows/WSL paths, and summarize the WSL environment.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 16

MIT

JavaScript

Nov 23, 2026

dsh plugin --profile web add dsh-wsl

by KannaKuron

DSH plugin: Git Bash shell for all agent modes on Windows (replaces pwsh executor)

Terminal & ClientsManifest valid

★ 59

↓ 1.5k/wk

MIT

JavaScript

Nov 14, 2026

dsh plugin --profile web add dsh-gitbash-shell

by AythyaCrispus

Windows Minimal Mode: persistent bash + str_replace_editor dsh plugin — registers an agent preset, provides a working persistent-bash backend on Windows, and exposes a GUI-editable bash path in the pl

Sessions & MessagesManifest valid

★ 2

JavaScript

Aug 15, 2026

dsh plugin --profile web add dsh-minimal-msys2