docs: 官方 CLI 安装默认最新版(不带 @版本)

This commit is contained in:
Menghuan1918
2026-08-13 23:48:56 +08:00
parent 9fdb44d9f9
commit 5a93f610d8
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -40,14 +40,14 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
### 官方 CLI 安装(推荐)
```sh
dsh plugin --profile web add dsh-better-sidebar@0.10.2
# 或(本机无 dsh 命令时)
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@0.10.2
# 或安装最新发布版
dsh plugin --profile web add dsh-better-sidebar
# 或(本机无 dsh 命令时)
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
# 或固定某版本
dsh plugin --profile web add dsh-better-sidebar@0.10.2
```
命令自动完成:`pnpm add` 登记依赖到 `~/.dsh/profiles/web/package.json` → 识别包内 `dsh.bundle.patch`,把插件自动加进 `dsh.profile.bundles` → 下次启动自动挂载(无需手写 `cordis.patch.yml` 挂载行)。更新同理:`dsh plugin --profile web add dsh-better-sidebar@<新版>`。
不带 `@<版本>` 时,pnpm 默认解析 npm 的 `latest` 标签,即最新发布版(当前 `0.10.2`)。命令自动完成:`pnpm add` 登记依赖到 `~/.dsh/profiles/web/package.json` → 识别包内 `dsh.bundle.patch`,把插件自动加进 `dsh.profile.bundles` → 下次启动自动挂载(无需手写 `cordis.patch.yml` 挂载行)。更新同理:重跑 `dsh plugin --profile web add dsh-better-sidebar` 即升到最新版。
> ⚠️ 首次在新 profile 上执行时,pnpm 11 的 `strict-dep-builds` 会拦截 node-pty/protobufjs 的构建脚本,命令会报 `Ignored build scripts`(包仍已安装、node-pty 预编译产物可直接用)。此时在 `~/.dsh/profiles/web` 执行 `pnpm approve-builds --all` 再重跑一次即可;`scripts/install.sh` 会自动处理(预写 allowBuilds + 清理旧挂载行)。
+5 -5
View File
@@ -40,14 +40,14 @@ Prerequisites: DSH installed (`dsh web` works, including the `dsh plugin` comman
### Official CLI install (recommended)
```sh
dsh plugin --profile web add dsh-better-sidebar@0.10.2
# or (no local dsh command):
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@0.10.2
# or install the latest published version:
dsh plugin --profile web add dsh-better-sidebar
# or (no local dsh command):
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
# or pin a specific version:
dsh plugin --profile web add dsh-better-sidebar@0.10.2
```
The command: runs `pnpm add` to register the dependency in `~/.dsh/profiles/web/package.json`, detects the package's `dsh.bundle.patch`, auto-appends the plugin to `dsh.profile.bundles`, and the next boot mounts it — no hand-written `cordis.patch.yml` mount line. Update the same way: `dsh plugin --profile web add dsh-better-sidebar@<new>`.
Without `@<version>`, pnpm resolves npm's `latest` tag — the newest published release (currently `0.10.2`). The command: runs `pnpm add` to register the dependency in `~/.dsh/profiles/web/package.json`, detects the package's `dsh.bundle.patch`, auto-appends the plugin to `dsh.profile.bundles`, and the next boot mounts it — no hand-written `cordis.patch.yml` mount line. Update the same way: re-run `dsh plugin --profile web add dsh-better-sidebar` to get the latest.
> ⚠️ On a fresh profile, pnpm 11's `strict-dep-builds` blocks node-pty/protobufjs build scripts and the command reports `Ignored build scripts` (the package is still installed; node-pty's prebuilds work as-is). Fix: run `pnpm approve-builds --all` in `~/.dsh/profiles/web` and re-run. `scripts/install.sh` handles this automatically (pre-writes allowBuilds + cleans up the old mount line).