Introduction¶
DeepSeek Harness (DSH) on Windows uses a default configuration that typically relies on PowerShell (pwsh). For developers accustomed to POSIX syntax or who need Git Bash, this can sometimes lead the model to generate incompatible commands. The dsh-gitbash plugin solves this problem by not adding new modes or tools; instead, it points DSH’s existing bash tool directly to Git for Windows Bash and hides PowerShell.
Plugin Overview¶
dsh-gitbash is a bundle plugin for DeepSeek Harness, maintained by yunuo110 under the MIT License. Its design goal is to allow the model to use Git Bash naturally on Windows while keeping the DSH architecture simple.
Core Features¶
The plugin mainly provides the following capabilities:
* No new modes, no new tools: The plugin does not register a gitbash tool; the model still sees DSH’s native bash tool.
* Default Git Bash: On Windows, the bash tool executes via Git\bin\bash.exe -lc <command>.
* Hidden PowerShell: pwsh is hidden from the prompt, and stale cache attempts to invoke it are rejected by the guard.
* Dynamic description: The bash tool description is rewritten with Git Bash/MSYS2 rules, guiding the model to use bash syntax.
* Windows-only: On non-Windows systems, the plugin is a no-op and does not affect native bash.
* Automatic path detection: The plugin automatically detects the Git Bash installation path.
Installation and Enablement¶
Run the following command in the plugin repository root to install it. In newer DSH versions, the dsh plugin command forwards arguments to pnpm; make sure pnpm is installed before running the installation.
dsh plugin --profile web add github:yunuo110/dsh-gitbash
After installation, DSH automatically performs the following actions:
1. Adds dsh-gitbash as a bundle to ~/.dsh/profiles/web.
2. Provides a Git Bash shell executor on Windows.
3. Re-enables the host-level tool-bash.
4. Disables pwsh-sandbox / tool-pwsh.
Note: After installation, a full restart of DSH is required. Both new sessions and previous conversations will use the same bash tool.
Configuration¶
By default, the plugin automatically detects the Git Bash path (order: environment variable GIT_BASH -> Program Files / Program Files (x86) / ProgramW6432 / LocalAppData / Scoop -> PATH, excluding WSL bash under System32).
To pin the path or adjust parameters such as timeouts, override the plugin configuration in the profile’s cordis.patch.yml:
- id: dsh-gitbash
config:
shellPath: 'C:\Program Files\Git\bin\bash.exe'
timeoutMs: 120000
maxTimeoutMs: 600000
maxOutputBytes: 64000
maxSpillBytes: 67108864
graceMs: 3000
| Field | Default | Description |
|---|---|---|
shellPath |
auto-detected | Fixed Git Bash path |
timeoutMs |
120000 | Default timeout for a single command |
maxTimeoutMs |
600000 | Timeout upper limit |
maxOutputBytes |
64000 | stdout bytes retained in memory |
maxSpillBytes |
67108864 | spill file size limit |
graceMs |
3000 | SIGTERM → SIGKILL grace period |
Typical Usage¶
After installing and restarting DSH, the tool description visible to the model points to Git Bash. The model can execute commands directly using POSIX/bash syntax.
Example scenarios:
* Check git status: The model calls the bash tool to run git status.
* Run tests: The model calls the bash tool to run npm test.
* Change permissions: If the current session sandbox does not have full access, the first call may fail. The model must set sandbox_permissions to danger-full-access as prompted.
JSON call example:
{
"command": "git status",
"description": "查看 git 状态",
"sandbox_permissions": "danger-full-access",
"justification": "Git Bash 无法在受限沙箱中启动,需要完全访问以执行 git 状态检查。"
}
Compatibility and Notes¶
- Environment requirements: DeepSeek Harness
0.1.2-rc.1(compatible with the same shell/tool seam from0.1.0-rc.6onward), Node.js22.19+. - Tool behavior: Each call starts a new non-interactive
bash.exe -lc;cd/export/ alias state is not preserved. - Syntax: Use POSIX/bash syntax (
$VAR,${VAR}), and avoid PowerShell’s$env:VAR. - License: MIT.
Conclusion¶
By using patches and configuration injection, dsh-gitbash enables a seamless switch to Git Bash on Windows, lowering the barrier for the model to execute commands in Windows environments. To view the source code or report issues, visit GitHub.