Skip to main content

hermes-wsl-terminal

❖ Communityv0.1.0

Run Hermes' terminal tools inside an existing WSL distro on Windows: one bash -c per command as the distro's default user, over the same files Windows sees at /mnt/<drive>, with no Docker Desktop, no image and no container to start or tear down. A host cwd is translated (C:\Users\me\proj becomes /mnt/c/Users/me/proj, \\wsl.localhost paths become the distro's own paths) and the mount root is asked once with wslpath, so a distro that moved its automount point still gets correct paths. cwd persists across commands, stdin and exit codes ride through wsl.exe, and hermes doctor / setup and the dashboard picker get real rows (wsl.exe path, WSL version, distros present, selected distro). HERMES_WSL_DISTRO and HERMES_WSL_USER select the distro and the user.

Open in Hermes Desktop
hermes plugins install hermes-wsl-terminal

README

From the reviewed commit 9e0f0d0 ↗; it updates when the author re-pins.

hermes-wsl-terminal

Run Hermes' terminal tools inside a WSL distro you already have, instead of a Windows shell.

# config.yaml
terminal:
  backend: wsl

One bash -c per command through wsl.exe -d <distro>, as the distro's normal user. No container, no image, no Docker Desktop, nothing to start or tear down — the distro is already installed and wsl.exe starts it on demand.

Why this exists

Hermes on Windows runs its shell commands through Git Bash on the Windows filesystem. That is the wrong environment for anyone whose toolchain lives in Linux: apt, systemd, a Linux node/python/git, POSIX permissions and paths, a project checked out under ~/.

The existing ways out are heavier than they need to be. The Docker backend needs Docker Desktop and an image. The SSH backend needs an sshd inside the distro and a key. WSL Containers (wslc) is a sandbox runtime that not every Windows build has. A WSL distro needs none of that: it is already there, it boots on first use, and Windows drives are mounted inside it at /mnt/<drive>, so the project you opened in Hermes is the same directory the commands run in.

Requirements

  • Windows 10/11 with WSL, and at least one distro (wsl -l -q lists one).
  • Hermes 0.20.6 or newer.
  • Nothing else. The plugin has no Python dependencies and makes no network calls.

Install

hermes plugins install Yicheng-Mark/hermes-wsl-terminal
hermes plugins enable hermes-wsl-terminal
hermes config set terminal.backend wsl

Or clone it into ~/.hermes/plugins/hermes-wsl-terminal and enable it.

Configuration

Optional, both read at environment-creation time:

Variable Default Meaning
HERMES_WSL_DISTRO the distro wsl starts with Which distro commands run in.
HERMES_WSL_USER the distro's default user Run as another user (wsl -u).

The mount root is detected per distro with wslpath, so a distro that moved its automount point in /etc/wsl.conf still gets correct paths.

What the backend does

  • Path translation. A Windows cwd is translated before the command runs: C:\Users\me\proj becomes /mnt/c/Users/me/proj, and \\wsl.localhost\Ubuntu-24.04\home\me becomes /home/me. Paths already written the Linux way pass through untouched.
  • cwd persistence. cd in one command is the starting directory of the next, the way it works in a terminal.
  • stdin, timeouts and background processes come from Hermes' shared environment plumbing, so they behave like the other spawn-per-call backends.
  • hermes doctor, hermes setup and the dashboard picker get real rows from the backend: the wsl.exe path, the WSL version, the distros present, and which one is selected.

What it does not do

  • No isolation. Commands run as your user in your distro, with your files and your network. Destructive-command approval stays on; this is explicitly not a sandbox.
  • No container-style resource limits. container_* settings do not apply to a distro.
  • It never stops the distro. Teardown releases nothing on purpose: your other shells and services share it.
  • Files inside the distro are addressed by their UNC path from the Windows side. File tools work on \\wsl.localhost\<distro>\home\me\...; the common case — a project on a Windows drive — needs no translation at all because /mnt/<drive> is the same directory.

Disclosure

Installing this plugin adds a terminal backend. When it is the selected backend, everything the model asks the terminal tool to run executes as your user inside your WSL distro, with that distro's network access and file permissions. The plugin itself reads no credentials, stores none, and makes no network calls; it spawns wsl.exe and, once per distro, wslpath. It does not change any Hermes core behaviour: it registers a provider and returns an environment object.

Development

python -m pytest tests/test_config.py tests/test_wsl_cli.py   # no WSL or Hermes needed
python -m pytest tests/test_live_wsl.py                       # HERMES_WSL_LIVE=1 HERMES_SOURCE=/path/to/hermes-agent
python scripts/check_hermes_contract.py --hermes-source /path/to/hermes-agent

Layout

hermes_wsl_terminal/config.py      path translation and CLI-output parsing (stdlib only)
hermes_wsl_terminal/wsl.py         wsl.exe calls (stdlib only)
hermes_wsl_terminal/environment.py BaseEnvironment: one bash -c per command
hermes_wsl_terminal/provider.py    registration, classification, probe, doctor rows
tests/                             stdlib tests, CLI-shape tests, live distro tests
scripts/check_hermes_contract.py   the plugin against a real Hermes checkout

The two stdlib modules carry the rules a reviewer needs to check — what a Windows path becomes inside the distro, and how wsl.exe's UTF-16 CLI output is decoded — and they are testable without a Hermes install or a distro.

hermes-windows-ops❖ Community★ 0

Windows and WSL triage skills for Hermes: processes that survive a quit (orphaned stdio MCP trees, lingering python/uv/node children), WSL-to-Windows interop where an argument reaches cmd.exe as shell syntax, config and encoding traps (UTF-8 BOM, legacy console code pages), and long-path or reserved-name errors. One skill plus a copy-paste command reference; the process, argv and job-object failure modes are pinned to reports #131561, #132069 and #61059 and re-verified against current main. Disclosure — instructions only: no tools, hooks, middleware, network calls or credentials, and the destructive diagnostics are marked and gated on asking the user first.

Tools
hermes-wslc-sandbox❖ Community★ 0

Run Hermes' terminal, file and execute_code tools in a Linux container on Microsoft's WSL Containers (wslc) runtime, so Windows users who run WSL Containers get a sandbox without Docker Desktop. Disclosure — the plugin spawns the wslc CLI (one short-lived process per command, plus one long-lived container per environment) and every call runs inside that container; containers have outbound network access unless docker_network is false; persistent sandboxes are left stopped on disk until removed; host environment variables enter the container only when named in docker_forward_env, and only paths listed in docker_volumes are bind-mounted. wslc rejects --cap-drop, --security-opt, --pids-limit, --init and --storage-opt, so this sandbox is not capability-dropped the way the Docker backend's is, container_disk is reported but not enforced, and dangerous-command approval deliberately stays enabled for this backend. The plugin reads no credentials, stores none, and makes no network calls of its own.

Tools

← Back to the catalog · catalog built Oct 19, 2026