返回目錄

dsh-win-gitbash

精選清單收錄維護狀態: 活躍

buhuikongpan/dsh-win-gitbash

Windows 上的 Git Bash 工具插件,替代 pwsh 与仅限 WSL 的 bash。

前往 GitHub
$ dsh plugin --profile <你的profile> add github:buhuikongpan/dsh-win-gitbash#<commit-sha>

14

星數

2

Fork

JavaScript

語言

MIT

授權條款

2026-08-15

建立於

2026-10-05

最近推送

MIT 開源的 DSH 工具外掛,用 Git for Windows 內建的 bash.exe 取代 Windows 上的 pwsh 與只能在 WSL 裡跑的 bash,註冊為 `gitbash` 工具,沙箱、逾時與背景工作行為與原生 shell 工具一致。

DSH 整合

原生執行環境

作者聲明

安全稽核

未稽核

最後核實

2026-11-14

授權條款

MIT

01它能幫你完成什麼?

  • 在 Windows 上讓模型執行 shell 指令,既不用 WSL,也不用等 PowerShell 慢慢啟動

    一個與原生 `pwsh`、`bash` 平級的 `gitbash` 工具,背後是 Git for Windows 內建的 bash.exe——沒有 WSL 層開銷,`C:\...` 與 `/c/...` 兩種路徑都能用

    機器上沒裝 WSL、或嫌原生 pwsh 工具啟動慢、執行卡頓的 Windows DeepSeek Harness 使用者

  • 把 pwsh 換掉,但不用重新適應一套工具契約

    與原生工具一致的呼叫卡片、一致的工作目錄解析、一致的沙箱升級提問(`sandbox_permissions` + `justification`),`run_in_background` 的暴露條件也一樣

    提示詞與習慣已經圍繞 DSH 原生 shell 工具搭好的團隊

  • 讓 shell 執行留在沙箱裡、也留在時間預算裡

    檔案沙箱模式、單次呼叫逾時、輸出截斷,以及立即回傳 jobId 的背景工作

    允許 agent 在真實 Windows 工作站上跑 shell 指令、需要和原生工具同級護欄的維運與開發者

02如何將外掛接入 DeepSeek Harness?

先決條件

  • 先裝好 Git for Windows(下載位置 https://git-scm.com/download/win),確認存在一個 bash.exe——工具會自動探測 `C:\Program Files\Git\bin\bash.exe`、`C:\Program Files\Git\usr\bin\bash.exe`、透過 `SCOOP` 定位的 scoop 安裝,以及 PATH 上的任意 `bash.exe`
  • 一個可以加入 bundle 的 DSH profile;外掛尚未發布到 npm,`dsh plugin add dsh-tool-gitbash` 會失敗,`github:` 形式是目前唯一可用的遠端方式

安裝步驟

  1. 01

    從 GitHub 安裝並 pin 一個 commit:`dsh plugin --profile <你的profile> add github:buhuikongpan/dsh-win-gitbash#<commit-sha>`——安裝指令會自行處理 `@deepseek-ai/*` peer 相依

    $ dsh plugin --profile <你的profile> add github:buhuikongpan/dsh-win-gitbash#<commit-sha>

  2. 02

    在 DSH 組合(composition)/ profile 中啟用該 bundle:把 `dsh-tool-gitbash` 加進 `dsh.profile.bundles`

  3. 03

    如果 pnpm 攔下 git 託管外掛的 `prepare` 建置,依提示把它印出的 key 加進該 profile 的 `pnpm-workspace.yaml`(`allowBuilds`)後重試

  4. 04

    另一種手動方式:把套件放進 DSH 的 `node_modules`(例如 `%APPDATA%\npm\node_modules\dsh-tool-gitbash`)或用 `link:` 指向儲存庫,備齊 `@deepseek-ai/*` peer,再在組合中啟用外掛

驗證整合成功

  • 重新啟動後模型就有 `gitbash` 工具了。如果沒有,先看 stderr 裡有沒有 `skipping profile bundle "dsh-tool-gitbash"`——那表示某個 `@deepseek-ai/dsh-*` peer 區間沒覆蓋目前的執行階段版本

03DSH 整合程度與能力邊界

DSH 整合原生執行環境

宣告了 `dsh.bundle` manifest 的 DSH 工具外掛:與原生 `pwsh`、`bash` 平級註冊一個 `gitbash` 工具,作為 `ctx.subprocess` 消費者直接呼叫 Git for Windows 內建的 bash

  • gitbash 工具呼叫

    `command`(經 `bash -c` 執行)、可選的一句話 `description`、`workdir`(預設工作階段目錄)、`timeoutMs`(預設 120s、上限 600s),以及設定開啟時的 `run_in_background`→指令輸出,過長會被截斷;背景呼叫立即回傳 jobId

    以你的使用者身分在 Windows 機器上執行任意 shell 指令`run_in_background` 只在 `enableRunInBackground` 開啟時才出現在工具 schema 裡
  • bash.exe 自動探測與手動覆寫

    什麼都不配,或在 `cordis.patch.yml` 的外掛列裡給一個 `bashPath`→解析出的 Git Bash 執行檔;探測時會跳過 `System32` 下的 WSL 啟動器,探測失敗則用設定的路徑

    覆寫路徑寫在 `cordis.patch.yml` 的外掛列裡
  • 與原生工具一致的沙箱升級

    被目前沙箱策略限制的呼叫,加上 `sandbox_permissions` 與 `justification`→經由 `approveEscalation` + `ctx.approval` 的權限提問,且每次呼叫都重新解析沙箱策略

    策略在呼叫時刻解析、而不是在 `apply()` 期定死,`read-only` / `workspace-write` 邊界才不會失效

04適合誰?何時不該用?

適合

  • 機器上沒裝 WSL、或嫌原生 pwsh 工具啟動慢、執行卡頓的 Windows DeepSeek Harness 使用者
  • 提示詞與習慣已經圍繞 DSH 原生 shell 工具搭好的團隊
  • 允許 agent 在真實 Windows 工作站上跑 shell 指令、需要和原生工具同級護欄的維運與開發者

不適合

  • 只面向 Windows,而且相依於 Git for Windows:它的全部意義就是用 Git Bash 取代 pwsh 或只能在 WSL 裡跑的 bash。README 沒有提供 macOS 或 Linux 的用法。
  • 宣告 `engines.dsh: ">=0.1.0-rc.6 <0.3.0"`,peer 區間同區間,所以 DSH 0.1.x 與 0.2.x 都能載入。但 DSH 啟動時會逐個校驗 profile bundle 的 peer:只要一個 `@deepseek-ai/dsh-*` 區間不匹配,整個 bundle 會被跳過,`cordis.patch.yml` 不生效,模型就沒有 `gitbash` 工具。
  • 套件沒有發布到 npm(`dsh-tool-gitbash` 在 npmjs 與 npmmirror 上都是 404),所以直接的 `dsh plugin add` 會失敗;安裝只能走帶 commit pin 的 `github:` 形式,而且 pnpm 可能攔下 git 託管外掛的 `prepare` 建置,要先補 `allowBuilds`。
  • 工具以你的使用者身分執行 shell 指令;約束來自 DSH 的沙箱策略,外掛每次呼叫都重新讀取,只有在組合裡確實沒有 policy 服務時才回退成無沙箱。要從受限呼叫裡升級,必須同時給 `sandbox_permissions` 和 `justification`。

05相容性、維護與安全提醒

  • 只面向 Windows,而且相依於 Git for Windows:它的全部意義就是用 Git Bash 取代 pwsh 或只能在 WSL 裡跑的 bash。README 沒有提供 macOS 或 Linux 的用法。
  • 宣告 `engines.dsh: ">=0.1.0-rc.6 <0.3.0"`,peer 區間同區間,所以 DSH 0.1.x 與 0.2.x 都能載入。但 DSH 啟動時會逐個校驗 profile bundle 的 peer:只要一個 `@deepseek-ai/dsh-*` 區間不匹配,整個 bundle 會被跳過,`cordis.patch.yml` 不生效,模型就沒有 `gitbash` 工具。
  • 套件沒有發布到 npm(`dsh-tool-gitbash` 在 npmjs 與 npmmirror 上都是 404),所以直接的 `dsh plugin add` 會失敗;安裝只能走帶 commit pin 的 `github:` 形式,而且 pnpm 可能攔下 git 託管外掛的 `prepare` 建置,要先補 `allowBuilds`。
  • 工具以你的使用者身分執行 shell 指令;約束來自 DSH 的沙箱策略,外掛每次呼叫都重新讀取,只有在組合裡確實沒有 policy 服務時才回退成無沙箱。要從受限呼叫裡升級,必須同時給 `sandbox_permissions` 和 `justification`。
2026-08-152026-10-05v0.2.3

MIT · 僅有 README 證據,最新版本 v0.2.3,未發布到 npm,未做安全稽核

06常見問題

怎麼把它裝進 DeepSeek Harness?

套件沒發布到 npm,所以用帶 commit pin 的 GitHub 形式:`dsh plugin --profile <你的profile> add github:buhuikongpan/dsh-win-gitbash#<commit-sha>`。然後把 `dsh-tool-gitbash` 加進該 profile 的 `dsh.profile.bundles` 並重新啟動,模型就會拿到 `gitbash` 工具。

機器上要先裝什麼?

只需要 Git for Windows,它提供 bash.exe。工具會自動探測 `C:\Program Files\Git\bin\bash.exe`、`C:\Program Files\Git\usr\bin\bash.exe`、透過 `SCOOP` 定位的 scoop 安裝,以及 PATH 上的任意 `bash.exe`,並跳過 `System32` 下的 WSL 啟動器。探測失敗時,在 `cordis.patch.yml` 的外掛列裡設 `bashPath`。

外掛裝上了,模型卻沒有 gitbash 工具,為什麼?

多半是 peer 版本不匹配。DSH 啟動時會校驗每個 profile bundle 的 `@deepseek-ai/dsh-*` peer,只要有一個區間沒覆蓋目前版本,整個 bundle 就被跳過,並在 stderr 印出 `skipping profile bundle "dsh-tool-gitbash"`。外掛宣告的區間是 `>=0.1.0-rc.6 <0.3.0`,大版本升級後先確認它覆蓋你正在用的 DSH。

它的行為和原生 pwsh / bash 工具一樣嗎?

依設計是一樣的:重用 DSH 內建終端卡片,工作目錄解析規則相同(沙箱根優先,否則工作階段 cwd 經 `canonicalPath` 正規化),沙箱升級提問同樣由 `sandbox_permissions` + `justification` 觸發。`run_in_background` 只在 `enableRunInBackground` 開啟時暴露,`timeoutMs` 預設 120s、上限 600s。

沙箱還有效嗎?

有效。外掛在呼叫時刻解析沙箱策略而不是在 `apply()` 期定死,因為 cordis 平行裝載各 plugin row,本外掛的 row 可能早於 `sandbox-policy` 註冊。只有組合裡確實沒有 policy 服務時,才回退為無沙箱工具。

08資料與來源

  • 作者聲明github.coma8b7e0a013bc…

    **面向 Windows 的 Git Bash 工具插件**(DSH / DeepSeek Harness tool plugin)

  • 作者聲明github.coma8b7e0a013bc…

    以 DSH 工具插件形式注册为 `gitbash`

  • 作者聲明github.coma8b7e0a013bc…

    本工具作为 `ctx.subprocess` 消费者直接调用 Git for Windows 自带 bash,

此頁面根據專案公開文件、儲存庫中繼資料與 DSH Plugins 的結構化解析所產生;最後核實於 2026-11-14。發現錯誤?提交更正。

🏆

最佳 DeepSeek Harness 外掛

從全目錄挑出的 12 個值得優先安裝的外掛,涵蓋各個分類。

DSH Plugins 是獨立的 DeepSeek Harness 外掛目錄,與 DeepSeek 官方無關,也不代表官方背書。第三方外掛未經安全稽核,安裝前請審查原始碼。

每週取得最新的 DeepSeek Harness 外掛,絕不濫發。