dsh-plugin-gitbash
在终端中运行以下命令:
dsh plugin install Jinsight-gif/dsh-plugin-gitbash
将以下提示词粘贴到 DeepSeek Harness 对话框中:
在 DeepSeek Harness 终端中执行 dsh plugin install Jinsight-gif/dsh-plugin-gitbash,插件源码位于 https://github.com/Jinsight-gif/dsh-plugin-gitbash,安装后重启 profile 即可挂载 gitbash 工具。
插件介绍
在 WSL 或双启动环境下使用 DeepSeek Harness 时,agent 会话始终被困在 Linux 侧,无法直接操作 Windows 宿主机上的 git 仓库、原生可执行文件或 D:\、C:\ 这类 Windows 路径。dsh-plugin-gitbash 正是为此而生:它以零依赖的自包含 Cordis 插件形式,向 DSH 注册一个 gitbash 工具,让模型可以直接在 Windows 宿主机的 Git for Windows Bash 中执行命令,无需切换终端或离开当前会话。
每次调用都会启动一个全新的非交互式 Git Bash 进程,stdin 绑定 /dev/null,杜绝 Shell 挂起;工作目录在 WSL 与 Windows 路径之间自动映射,/mnt/d/...、d:/... 和 D:\... 三种写法均可识别。插件还内置了 bash.exe 自动检测(覆盖 ProgramFiles、各挂载盘符及 PATH),并在挂载时未找到路径的情况下支持每次调用自动重解析,无需重启 DSH。超时、输出截断等参数均可按 profile 配置,满足生产环境的可控性要求。
适合在 WSL 与 Windows 双环境开发、需要 agent 代管 Windows 侧 git 操作或执行 Windows 原生脚本的开发者,尤其是希望全程留在 DSH agent 工作流中、避免频繁切换 WSL 与 Windows 终端的场景。
使用场景
- 在 WSL 会话中直接操作 Windows 侧 git 仓库,无需切换终端
- 执行 Windows 原生可执行文件或脚本,路径使用 D:\、C:\ 格式
- 双启动环境下 agent 全程留在 DSH 工作流内完成 Windows 侧任务
适合人员
- 在 WSL 与 Windows 双环境开发、需要 agent 代管 Windows 侧 git 操作的开发者
- 使用 DSH 并希望 agent 具备 Windows 宿主工具调用能力的用户
- 希望减少 WSL 与 Windows 终端频繁切换、保持沉浸式工作流的团队