Introduction

On Windows, DeepSeek Harness (DSH) uses PowerShell as the default execution environment. When writing POSIX syntax involving paths, pipes, variables like $VAR, and conditional logic, Bash is usually more natural for the AI than PowerShell. However, DSH’s default configuration (dsh-base) disables the Bash stack on Windows, forcing the model to write PowerShell. The dsh-all-gitbash plugin performs runtime redirection so that, from the first turn of the conversation, the model only sees a bash tool, while execution is actually carried out in the MSYS environment provided by Git for Windows, solving this compatibility issue.

Core Features

The plugin primarily implements the following features:

  1. Runtime redirection without restart: It does not modify the composition or profile patch. It replaces the executor via injection, and the original state can be restored by hot-reloading or unloading.
  2. Native Bash on the model side: It removes the pwsh tool from the tool registry and registers a native bash tool. The tool description seen by the model is identical to that in Linux sessions, with no Windows or MSYS wording.
  3. Command translation compatibility layer: Automatically handles PowerShell syntax that the model may occasionally prefer. Includes $env:NAME → ${NAME} and C:\... → /c/..., ensuring commands run correctly in Git Bash.
  4. Honest sandbox gating: MSYS cannot start inside a restricted-token sandbox (signal pipe). The plugin fails fast in restricted mode and provides escalation guidance, rather than bypassing sandbox boundaries.
  5. One-click toggle: Git Bash mode can be enabled or disabled at any time via a toggle slider in the Web settings panel or the ~/.dsh/settings.yaml configuration file, and the state persists after restart.

Installation and Enablement

Install via DSH’s plugin system. It will be automatically assembled after restart:

dsh plugin --profile web add @icelily/dsh-all-gitbash

Temporary Injection (Development Testing)

No DSH restart is required. Inject it directly within a session:

# 1. 构建(零依赖)
npm run build

# 2. 在 DSH 会话内注入
dev_inject_plugin {"dir": ".../dsh-all-gitbash"}

Typical Usage

Once enabled, the model writes Bash commands directly. You can run standard npm scripts directly:

npm run build
npm run test

Configuration Notes

The plugin configuration is mainly managed in ~/.dsh/settings.yaml. The core fields are as follows:

dsh-all-gitbash:
  enabled: true            # 总开关:false 时还原为原装 pwsh
  sandboxGate: true        # 受限沙箱下快速失败并提示升级
  translateEnvVars: true   # 启用 $env:NAME -> ${NAME} 转换
  translateDrivePaths: true # 启用 C:\... -> /c/... 转换
  registerBashTool: true   # 注册原生 bash 工具
  disablePwshTool: true    # 从模型工具面移除 pwsh 工具

Notes and Compatibility

  1. Platform restriction: Windows only.
  2. Dependency requirement: Node.js >= 20 is required.
  3. Sandbox restriction: MSYS cannot start inside a restricted-token sandbox. For the best experience, use the danger-full-access permission in Git Bash sessions.
  4. Compatibility: Compatible with dsh-gitbash-preset; both can be installed at the same time. This plugin primarily targets full-mode Web sessions, while the preset primarily targets minimal mode.

Conclusion

dsh-all-gitbash redirects the PowerShell execution stack on Windows to Git Bash, solving the impedance mismatch when the model writes POSIX code in Windows environments. Through runtime redirection, command translation, and tool-surface restructuring, it provides a near-native Linux-like development experience for DSH on Windows.