
zimzaza4/dsh-bash-win
60Last commit Aug 14, 2026
dsh-bash-win DSH plugin
This plugin enables DSH on Windows to use Git Bash and WSL2 bash, bypassing the restricted token that disables official bash tools. It uses ctx.subprocess to spawn bash.exe or wsl.exe, and provides sandbox (bwrap in WSL) and approval request features. It supports both front-end execution with timeout and background tasks.
How to install the dsh-bash-win DSH plugin
dsh plugin --profile web add @zimzaza4/dsh-bash-winCopying does not run this command. Review the repository and version before installing the dsh-bash-win DSH plugin.
dsh-bash-win DSH plugin data source
dsh-bash-win DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-bash-win DSH plugin can do
- Provides two bash tools: `git_bash` (Git Bash/MSYS2) and `wsl_bash` (WSL2/Linux) with automatic path detection.
- Supports sandbox mode (`sandbox: true`) for WSL2 using bwrap to restrict file access; system directories read-only, workspace writable, /mnt/c read-only except workspace.
- Approval mechanism: `require_approval` triggers a popup before execution; escalation requests (`sandbox_permissions` + `justification`) also require user approval.
- Front-end execution with `timeoutMs` for process tree termination; background tasks with `run_in_background: true` returning job ID, plus `job_output`/`job_kill`.
- Output collection with 256 KiB memory limit; overflow truncates and spills to file.
- Web terminal card with icon, expandable output, and exit code status.
Where the dsh-bash-win DSH plugin fits
- Run MSYS2 commands (e.g., grep, sed, git) on Windows via Git Bash under DSH.
- Execute Linux commands (apt, gcc, python) in a WSL2 environment from DSH conversations.
- Use sandboxed execution in WSL for sensitive or untrusted commands, with bwrap restricting file system access.
- Set up approval workflows for commands that require user confirmation, especially for high-risk operations.
- Run long-running background tasks (e.g., compilation, data processing) and retrieve results later.
Who the dsh-bash-win DSH plugin is for
- Windows users of DeepSeek Harness who need bash capabilities beyond the default PowerShell.
- Developers who require a Linux environment (WSL2) for tooling or testing within DSH.
- Users who want sandboxed execution and approval gates for security-sensitive commands.
dsh-bash-win DSH plugin limitations
- Git Bash (`git_bash`) has no file sandbox; `sandbox: true` will fail due to Windows restricted token limitations (Cygwin cannot start).
- WSL2 (`wsl_bash`) first-time cold start can take several seconds; use `timeoutMs` to control wait.
- Each invocation creates a new process; state is not preserved across calls.
- Sandbox mode for WSL2 requires `bubblewrap` installed in the WSL distribution (e.g., `apt install bubblewrap`).
- Hot Module Replacement (HMR) is unreliable; restarting `dsh web` is required after code changes.
dsh-bash-win DSH plugin: from the repository README
Quoted from the zimzaza4/dsh-bash-win README, the upstream source of the dsh-bash-win DSH plugin. Copyright remains with the original authors.
在 Windows 上为 DeepSeek Harness(DSH)提供 **Git Bash** 与 **WSL2** 两个 bash 工具的 Cordis 插件。 ## 这个项目解决什么 - DSH 在 Windows 上**禁用了官方 bash 工具**(只有 pwsh) 本插件通过 `ctx.subprocess` 直接 spawn `bash.exe` / `wsl.exe`,绕开受限令牌层, 把 Git Bash 或者 WSL2 带进 DSH,并**自建有效沙箱**(WSL 内 bwrap)与**审批请求**。 ## 安全模型 | 维度 | 机制 | 说明 | | --- | --- | --- | | **默认执行** | 无沙箱,全权限 | `git_bash` / `wsl_bash` 默认直接跑,可读写任意路径(绕开沙箱的代价) | | **沙箱** | WSL 内 bwrap(`sandbox: true`) | 系统目录只读、workspace 可写、`/mnt/c` 其余只读;越界写入被拒并报 `[sandbox: file access denied under workspace-write mode]` | | **审批** | `ctx.approval` | `require_approval: true` 执行前弹窗;升权请求(`sandbox_permissions` + `justification`)弹窗;`ask` 策略弹窗、`never` 自动拒绝 | 关键概念: - **操作路径本身不触发审批**——沙箱对越界的处理是"拒绝"(报错,不弹窗); - **审批只出现在两处**:显式批准模式(`require_approval`)和越界后的升权请求; - **升权阶梯**:`workspace-write`(bwrap 受限)→ `danger-full-access`(去掉 bwrap), 走官方 `approveEscalation` 流程,必须严格加宽且经用户批准。 ## 工具 | 工具 | 后端 | UI 标题 | 能力 | | --- | --- | --- | --- | | `git_bash` | 本地 Git Bash(MSYS2) | Git Bash | 批准模式(`require_approval`)、官方沙箱接入(`sandbox`,Windows 受限模式报 Cygwin 限制)、后台任务 | | `wsl_bash` | WSL2(Linux) | WSL Bash | **bwrap 真沙箱**(`sandbox: true`)、升权审批(`sandbox_permissions` + `justification`)、后台任务 | 共性能力: - 前
Read the full READMERepository license: MIT
dsh-bash-win DSH plugin questions
How do I install dsh-bash-win?
Run `dsh plugin --profile web add @zimzaza4/dsh-bash-win` in your terminal. After installation, restart `dsh web` to activate the plugin. The plugin's tools (`git_bash` and `wsl_bash`) will then appear in new conversations.
How can I use sandbox mode with Git Bash?
Git Bash cannot use sandbox mode on Windows due to restricted token limitations. The `sandbox: true` option will fail with a runner error. For sandboxed execution, use `wsl_bash` with `sandbox: true` and ensure `bubblewrap` is installed in your WSL distribution.
What is the difference between git_bash and wsl_bash?
`git_bash` runs the local Git Bash (MSYS2) on Windows, providing full MSYS2 semantics but no file sandbox. `wsl_bash` runs in a WSL2 Linux environment, supports true sandbox via bwrap, and can run Linux commands (apt, gcc, etc.). WSL2 has a cold start delay on first use.
How do I configure a custom Git Bash path?
You can set the path in three ways: 1) plugin config: `bashPath` in `cordis.patch.yml`, 2) environment variable `DSH_BASHX_BASH_PATH`, or 3) automatic detection from standard installation locations. The priority order is config > env var > auto-detection.
Why are the bash tools not showing up after installation?
The most common cause is not restarting `dsh web` after installation. Run `dsh plugin --profile web add @zimzaza4/dsh-bash-win` then restart the DSH server. You can verify with `dsh --profile web --dump-config` to check if the plugin layer is mounted.