Preface¶
When running DeepSeek Harness (DSH) on Windows, the built-in Agent presets default to PowerShell (pwsh). However, many scripts, tutorials, and CI snippets are written for Bash. If you do not want to install WSL solely for the terminal but wish for the Agent to execute Bash commands directly, you need to switch the shell provider in DSH to Git Bash, which comes bundled with Git for Windows.
The community plugin dsh-bash-windows (maintainer Very12345, GitHub repository Very12345/dsh-bash-windows) provides a “Git Bash” toggle in the DSH settings page. When enabled, the pwsh tool in the four built-in modes—Standard, Code, Minimal, and Cordis—is replaced by bash; when disabled, it reverts to PowerShell. The plugin does not add independent modes but simply replaces the terminal-based tools.
What is this¶
dsh-bash-windows is a client-side plugin for DSH. By using the installed Git Bash as the ctx.shell executor, it allows Agent presets on Windows to provide a Bash tool without relying on WSL. The current package version is 0.2.5, licensed under MIT. Community directory page: skillhub.cn/plugins/Very12345/dsh-bash-windows.
Core Features¶
Settings Toggle and Per-Profile Persistence¶
After updating the plugin and restarting DSH, click the toggle in “Settings → Git Bash”. The toggle is off by default. The state is saved independently per current profile to:
$DSH_HOME/git-bash-windows/profile-<hash>.json
Toggling the switch only updates in-place the terminal tool of existing Agents, without reloading the entire profile via the host ConfigEditor. The enabled field in the legacy cordis.patch.yml remains usable as an initial value if no independent state file exists yet. Both existing sessions for the four modes and subsequently created sessions will use this setting.
Terminal Behavior in the Four Built-in Modes¶
Only the terminal tool is replaced; other tools remain unchanged.
| Mode | After Enabling Git Bash |
|---|---|
| Standard | Git Bash, executed step-by-step |
| Code | Retains original run_code and PTC SDK; pwsh in the SDK is replaced with bash |
| Minimal | A single persistent Bash terminal; working directory and environment variables persist across calls |
| Cordis | Git Bash; other Cordis configurations and tools are retained |
Disabling the toggle only removes the Bash tool and restores PowerShell; it does not cancel commands already dispatched. Execution resources are cleaned up when the session ends. In Minimal mode, PowerShell and Bash each retain their own terminal state; variables or working directories are not migrated when switching.
Permissions and Security Notes¶
Git Bash cannot start under a Windows ACL restricted token. Once enabled, this terminal executes using current user privileges and provides no Windows ACL file sandbox; the settings page will explicitly warn about this. Permissions, approvals, and execution for other tools are still managed by DSH. Before installing or using, you should review the repository source code and the MIT license yourself to confirm it complies with your security policies.
Switching Logic When Coexisting with SSH Plugin (0.2.5)¶
When the SSH plugin is also enabled in DSH 0.2.0-rc.2, if the legacy toggle used settings.update and triggered the ConfigEditor to coordinate the entire profile set, it might cause session service anomalies (e.g., command directory warmup failed / session/follow). The new toggle persists independently and swaps tools in-place without triggering that reload chain; if a save fails, it restores the original toggle and tools. If the host has already entered an invalid state, a complete exit and restart of DSH is required; simply updating the plugin cannot fix already invalidated legacy service instances.
Installation and Activation¶
Environment requirements (from README): Windows, Git for Windows, DSH 0.2.0-rc.2 or compatible version; development environment requires Node.js >= 22. The npm public registry has not yet published this scoped package, so you can also install the local package via the DSH plugin manager after running npm pack.
Execute the official installation command under the desktop profile:
dsh plugin --profile desktop add github:Very12345/dsh-bash-windows
After installation, restart DSH and turn on the Git Bash toggle in the settings. When migrating from the legacy independent “Bash Mode”, please use the new toggle within the four built-in modes; the plugin does not rewrite the history or mode records of old conversations.
Typical Usage: Invoking Windows Commands within Bash¶
The input submitted to the tool is Bash source code. Bash double quotes will expand $variables, $_, and command substitutions; $_ passed from PowerShell needs to be protected first. The README provides reproducible examples.
Invoke PowerShell and avoid MSYS from incorrectly transforming arguments:
MSYS2_ARG_CONV_EXCL='*' powershell.exe -NoProfile -Command 'Get-Process | Where-Object { $_.ProcessName -match "Wei" }'
Complex or multi-line scripts can use here-docs with single-quote delimiters; non-ASCII scripts can also use UTF-16LE base64 -EncodedCommand to mitigate Windows PowerShell input encoding differences:
powershell.exe -NoProfile -NonInteractive -Command - <<'PWSH'
1,2,3 | ForEach-Object { $_ * 2 }
PWSH
MSYS2 may interpret arguments like /FI or /c of native Windows commands as POSIX paths. Turn off the conversion only for the specific command needed:
MSYS2_ARG_CONV_EXCL='*' tasklist.exe /FI "IMAGENAME eq Weixin.exe" /FO CSV /NH
MSYS2_ARG_CONV_EXCL='*' cmd.exe /d /c "echo ok"
Since version 0.2.2, the above boundary descriptions are written into the Bash tool descriptions of the four modes (including the PTC SDK and Minimal persistent terminals); the executor passes commands verbatim and does not guess or rewrite the user’s $ expressions.
Applicable Scenarios and Notes¶
Suitable for: Users on Windows using DSH desktop, with Git for Windows installed, who want the Agent to uniformly use Bash in the Standard / Code / Minimal / Cordis presets without introducing WSL.
Notes:
- The plugin runs terminal commands with the current DSH process and user privileges after enabling Bash, without ACL sandboxing; please review the source code first in sensitive environments.
- In Minimal mode, when switching between PowerShell and Bash, directories and environment variables are not migrated between each other.
- The community directory skillhub.cn is an independent site and has no official affiliation with DeepSeek / High-Flyer; installation commands and behavior are subject to the GitHub README.
Conclusion¶
dsh-bash-windows consolidates “Windows + DSH + Git Bash” into a one-click switch in the settings, covering the four built-in modes and providing documented examples for MSYS and PowerShell interoperation. If you maintain Agent workflows on Windows, you can install it from the directory page or the repository README, turn on Git Bash per profile, and then start a new session to verify if the terminal tool is bash.
- Directory Page: https://www.skillhub.cn/plugins/Very12345/dsh-bash-windows
- GitHub: https://github.com/Very12345/dsh-bash-windows