dsh-installer
开发工具 活跃维护

dsh-installer

ningbonb/dsh-installer

提供macOS与Windows平台的一键安装包,无需手动配置环境,下载即可完成DeepSeek客户端的快速部署,降低安装操作门槛,适配两类系统用户的使用需求。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Batchfile
主要语言
MIT
开源协议
67 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ningbonb/dsh-installer
git clone https://github.com/ningbonb/dsh-installer.git
git clone git@github.com:ningbonb/dsh-installer.git
README.md main

dsh-installer

中文

One-click entry scripts for DeepSeek Harness (dsh), aimed at people who are not comfortable with the command line.

Each script launches the Web UI when dsh is already installed, and otherwise runs the setup first — Node.js, pnpm, the dsh CLI, and any optional plugin bundles — in an interactive terminal, with a language selection first (Chinese by default).

Files

File Platform Purpose
dsh.command macOS (also Linux via bash) Combined entry — launch, or install first when dsh is missing
dsh.bat Windows Combined entry — launch, or install first when dsh is missing

Usage

macOS

  1. Double-click dsh.command.
    • First run may be blocked by Gatekeeper: right-click → Open instead, or run chmod +x dsh.command first.
  2. If dsh is missing or broken, the script picks a language (default Chinese) and walks through the install.
  3. Afterwards it starts the Web UI at http://127.0.0.1:3080.

Windows

  1. Double-click dsh.bat.
  2. If dsh is missing, the script picks a language (default Chinese) and installs. Node.js is installed via winget when missing (you may be asked to re-run once so the new PATH takes effect).
  3. Afterwards it starts the Web UI.

What the scripts do

  1. Fast path — if dsh is on PATH and passes a smoke check, launch dsh web immediately.
  2. Language selection — Chinese by default, English optional.
  3. Node.js check — requires 22.19+ or 24+. Installed automatically via Homebrew (macOS) or winget (Windows) when missing or too old.
  4. npm global prefix — on macOS, if the global prefix is not writable, the script offers a password-free user-local prefix (~/.npm-global) instead of requiring sudo.
  5. pnpm — installed globally (dsh plugin add delegates to pnpm).
  6. @deepseek-ai/dsh — installed globally, providing the dsh command.
  7. Optional plugins — a loop lets the user enter package names (npm name, tarball path, or github: spec) installed into the web profile; empty input finishes.

Self-update

Both scripts check for a newer release of this installer and update themselves:

  • Never blocks a launch. A background check (throttled to once per day, short timeout) fetches the latest GitHub release tag into ~/.dsh-installer/update_state (or %USERPROFILE%\.dsh-installer\update_state on Windows) and finishes on its own.
  • Prompts on the next run. At startup, the script reads that cached state; if a newer version exists, it prints a 3–5 second prompt (defaulting to "no", so an unattended run is never interrupted).
  • Applies safely. On "yes" it downloads the new script to dsh.command.new / dsh.bat.new; the following run validates and swaps that file in at the very top, then re-executes. Failed or invalid downloads are removed, and the currently running copy is never overwritten mid-execution.
  • No re-nagging. A "no" answer records that version as already seen, so the prompt does not return until a newer release appears.

Releasing

Each release must keep two things in sync so the self-update can compare versions:

  1. Bump DSH_INSTALLER_VERSION at the top of both dsh.command and dsh.bat.
  2. Tag the release v<same-version> (e.g. v0.1.1) and publish it as a GitHub release — the check reads releases/latest.

Example:

gh release create v0.1.1 --title v0.1.1 --notes "..."

License

MIT