@smounives/dsh-git-runtime

中文文档
1.0.0发布于 2026/11/02MITES Module零依赖

Git Runtime Updater: install, update, and uninstall the Git runtime used by DeepSeek Harness on Windows, Linux, and macOS.

原始使用文档
文档目录8 节
  1. Platform support
  2. Install
  3. What it does
  4. Safety model
  5. Configuration
  6. Development
  7. 中文说明
  8. License

Git Runtime Updater

A DeepSeek Harness plugin that detects the local Git installation and installs, updates, or removes it through the platform-supported channel. It is deliberately not a Git UI: it manages the Git runtime that the agent, the terminal, and plugin installation depend on.

Platform support

PlatformInstallation channelInstallUpdateUninstall
WindowsMinGit from the official git-for-windows/git releaseYesYesYes
LinuxHomebrew when installed; otherwise apt, dnf, yum, pacman, zypper, or apkYesYesHomebrew yes; distro package only when this plugin installed it
macOSHomebrew when installed; otherwise Xcode Command Line ToolsYesHomebrew yes; Xcode CLT noHomebrew yes; Xcode CLT no

On Linux and macOS the plugin never edits shell profiles. It uses pkexec (desktop session) or passwordless sudo -n for package-manager operations; when neither is available it reports the exact command to run in a terminal instead of asking for or storing a password.

Install

In DeepSeek Harness: Plugins → Add plugin, then paste one of:

@smounives/dsh-git-runtime
https://github.com/YukiSuoug/dsh-git-runtime

The npm package is published under the @smounives scope because the publishing account's npm token is scoped to that account; the GitHub URL installs directly from source with the same plugin id.

After installation, open Settings → Git Runtime (the page title is Git Runtime Updater).

What it does

  • Reports the installed Git version, executable, location, package-manager source, and PATH status.
  • Install when Git is missing:
    • Windows downloads the latest official MinGit archive, verifies that cmd/git.exe starts, installs it under %LOCALAPPDATA%\Programs\MinGit, adds it to the user PATH, and configures the global Git HTTPS settings for restricted processes.
    • Linux/macOS asks Homebrew or the distro package manager to install Git.
  • Update through the same channel, with a version check where the channel exposes one.
  • Uninstall through the channel that owns the installation.
  • Apply now on Windows when the user PATH already contains Git but the running DSH process started before that change.

Safety model

  • Windows only removes its own %LOCALAPPDATA%\Programs\MinGit folder, its user PATH entry, and Git HTTPS values that this plugin wrote or that point into that folder.
  • Linux and macOS do not remove distro-managed Git unless this plugin installed it. For a pre-existing system Git the page shows the removal command instead.
  • Homebrew-managed Git can be removed through Homebrew; Homebrew refuses when another formula depends on Git.
  • Destructive actions require a confirmation dialog. The Web UI talks to the Host over same-origin, confirmation-header-checked JSON routes.
  • No telemetry and no credentials are collected.

Configuration

Edit the plugin row in the profile's cordis.patch.yml:

- id: dsh-git-runtime
  name: '@smounives/dsh-git-runtime'
  config:
    # Windows only
    installDir: 'D:\Tools\MinGit'
    addToPath: true
    configureHttps: true

Development

The package is plain JavaScript; there is no build step.

node --check index.js
node --check lib/unix.js
node --check client.js

The Host half is index.js (Windows) plus lib/unix.js (Linux/macOS). The Web half is client.js and registers a page in the settings.section slot.

中文说明

Git Runtime Updater 用来管理 DSH 运行所依赖的 Git 程序本身,不是 Git 图形客户端。

  • Windows:下载官方 MinGit,安装到 %LOCALAPPDATA%\Programs\MinGit,写入用户 PATH,并配置受限进程需要的 HTTPS 设置;支持安装、更新、卸载,以及“立即应用”修复当前 DSH 进程的 PATH。
  • Linux / macOS:优先使用 Homebrew;没有 Homebrew 时使用发行版包管理器(apt、dnf、yum、pacman、zypper、apk)或 Xcode 命令行工具。需要管理员权限时会使用 pkexec 或无密码 sudo -n,否则只显示需要手动执行的命令。
  • 系统包管理器安装的 Git 只有在“本插件安装的”情况下才允许卸载;已经存在的系统 Git 只显示卸载命令,避免误删系统依赖。

License

MIT

版本与发布记录

@smounives/dsh-git-runtime 共发布 2 个版本,首次发布于 2026/11/02;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.0.0latest2026/11/021 天前
0.0.0-stage2026/11/021 天前

关于 @smounives/dsh-git-runtime 的常见问题

@smounives/dsh-git-runtime 是什么?

Git Runtime Updater:安装、更新和卸载DeepSeek Harness在Windows、Linux和macOS上使用的Git运行时。

如何安装 @smounives/dsh-git-runtime?

在项目目录运行 npm install @smounives/dsh-git-runtime,或使用 pnpm add / yarn add / bun add。

@smounives/dsh-git-runtime 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/smounives__dsh-git-runtime 是否存在。

@smounives/dsh-git-runtime 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@smounives/dsh-git-runtime 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.19.0 || >=24.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@smounives/dsh-git-runtime 可以商用吗?

@smounives/dsh-git-runtime 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@smounives/dsh-git-runtime 还在维护吗?

最新版本 1.0.0 发布于 2026/11/02(1 天前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/11/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。