Skip to main content

How to use dsh-gitbash-preset

Provides a Windows variant for DSH minimalist mode, using Git for Windows MSYS bash instead of standard bash, and fixes compatibility issues on Windows.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-gitbash-preset

— source: plugin_wiki.wiki_content

Install & verify

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

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 幂等安装:插件启动时把打包的预设复制到用户预设根(${DSH_HOME:-~/.dsh}/.agent-presets/minimal-gitbash/),已存在则跳过,force: true 才覆盖;
  • 自动探测 bash:GIT_BASH 环境变量 → 常见安装目录(ProgramFiles / ProgramFiles(x86) / LOCALAPPDATA)→ PATH 中的 bash.exe → 兜底 bash,无需硬编码路径;
  • 沙箱感知门控:MSYS 运行时无法在 Windows 受限令牌沙箱内启动(无法创建 signal pipe),因此命令仅在"完全访问"策略下执行——不绕过沙箱,受限时给出明确升级指引;
  • 极简不变:固定 persona、str_replace_editor、无上下文压缩,与原极简模式一致。
    • 把会话沙箱切到完全访问,之后所有 bash 调用直接走 git bash;

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Who is this plugin for?

Mainly ordinary users who use DSH's 'Minimal Mode' on Windows. DSH's built-in minimal mode doesn't run on Windows, and this plugin provides an alternative preset.

Do I need to install it on macOS or Linux?

No. This preset is only enabled on Windows (agent.cordis.yml directly disables it with process.platform !== 'win32'), and other systems can continue using the official minimal mode.

What do I need to do after installation?

Restart DSH to let the preset be written to the user preset directory (~/.dsh/.agent-presets/minimal-gitbash/), then create a new session in the web interface and select 'Minimal Mode (Git Bash)'.

Can it be used when the session sandbox is workspace-write?

Cannot use it directly. The bash tool will refuse to execute due to sandbox restrictions; either switch the session to 'Full Access', or let the model follow the prompt to use sandbox_permissions: "danger-full-access" with an explanation for a one-time upgrade.

Will it change the bash tool already on my computer?

It won't affect other bash calls on the system. It only replaces the shell provider within the scope of sessions using 'Minimal Mode (Git Bash)', other sessions remain unchanged.

How to force overwrite an already installed preset?

Add force: true to the plugin configuration in the install command; the plugin will use the bundled preset file to overwrite the existing version in the user directory.

How to uninstall?

Use dsh plugin --profile web remove to remove the plugin, then manually delete the minimal-gitbash folder from the user directory.

What is the difference between it and the official minimal mode?

The persona and str_replace_editor tools are functionally identical; the only difference is that the bash tool spawns a new shell for each invocation (not preserving cd/export state), because persistent PTYs are unavailable on Windows.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明
  • Node: >=20

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule