dsh plugin list 怎么用?DeepSeek Harness 查看已安装插件与 profile 归属

安装与快速上手发布于 2026-09-12作者: DeepSeek Plugin 插件市场
DeepSeek HarnessDSH plugindsh plugin list已安装插件profile
dsh plugin list 是在 profile 目录里跑 pnpm list 的命令,默认只列直接依赖,加 --json、--depth Infinity 可换输出。注意它列的是 npm 依赖,真正决定加载哪些层的是 profile 的 dsh.profile.bundles,两个数字常常对不上。

dsh plugin list 的完整形态是 dsh plugin --profile <名字> list,它把参数转发给 profile 目录里的 pnpm,等价于在那个目录跑 pnpm list;但你要找的「已安装插件」其实有两个口径——list 看的是 pnpm 依赖,真正决定加载哪些插件层的是 profile 的 dsh.profile.bundles,两者经常对不上(来源)。

DSH plugin 概览:两个口径,先分清再看数字

在 DSH 里问「装了哪些插件」有两种答案:一种来自 pnpm 依赖(dsh plugin list),一种来自 profile 的组合包清单(dsh.profile.bundles),它们回答的不是同一个问题。 DSH插件 与 DeepSeek插件 的已装清单都靠这条命令查,先记住结论:

  1. dsh plugin list:列的是 $DSH_HOME/profiles/<名字> 目录里的 npm 依赖,管「包里在不在机器上」;
  2. dsh.profile.bundles:列的是启动该 profile 时按顺序叠加哪些插件层,管「运行时会加载什么」;
  3. 两者不等价:内置组合包只在前者缺席,没声明 dsh.bundle 的库包只在后者缺席。

把这个区别记住,后面所有「为什么数量对不上」的疑问都会自己解开。

dsh plugin list 怎么用:转发给 pnpm,参数照旧

dsh plugin --profile <name> <args...> 会把 --profile 之后的参数原样转发给该 profile 目录里的 pnpm,所以 list 就是 pnpm list(别名 ls),pnpm 的全部参数都成立(来源)。 上手三步:

  1. 先拿到 profile 名字。 启动 dsh web 用的是内置的 web profile;webheadless 首次使用会从随包模板自动初始化,其他名字的 profile 必须由 dsh plugin 通道创建。

  2. 执行默认查询,只看直接依赖:

bash
# 默认 --depth 0,只列直接依赖
dsh plugin --profile web list

pnpm list 的默认深度就是 --depth 0,所以不加参数时输出的已是直接依赖,而不是整棵依赖树(来源)。

  1. 按需要换输出形态
bash
# 完整依赖树
dsh plugin --profile web list --depth Infinity

# 只列 dependencies,不列 devDependencies
dsh plugin --profile web list --prod

# JSON 输出,适合写检查脚本
dsh plugin --profile web list --json

# 按包名模式过滤(位置参数)
dsh plugin --profile web list "dsh-*"

装插件本身走的是同一条通道,《dsh plugin add 怎么用?》里有 add 的完整语法与目标写法。

DeepSeek Harness 已安装插件列表怎么读:pnpm 依赖 vs dsh.profile.bundles

dsh plugin list 的数字与 profile 的 dsh.profile.bundles 长度经常不一致,原因有两条:内置组合包从 dsh 安装本体解析、不进 profile 的 node_modules(所以 list 里看不到),而没声明 dsh.bundle 的包会装上却不激活任何层(所以 list 里看得到)(来源)。 按下面的顺序对着看,就不会读错:

  1. 看 pnpm 侧装了哪些依赖
bash
dsh plugin --profile web list
  1. 看 profile 的依赖与组合包清单——同一个文件里,dependencies 是 pnpm 管的依赖,dsh.profile.bundles 是 dsh 维护的加载顺序:
bash
cat ~/.dsh/profiles/web/package.json

结构形如:

json
{
  "dependencies": { "<第三方插件包>": "…" },
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "<第三方插件包>"]
    }
  }
}
  1. 对齐两个数字@deepseek-ai/dsh-base@deepseek-ai/dsh-web-app@deepseek-ai/dsh-headless 这类内置组合包总是从 dsh 安装本体解析,pnpm 只负责 out-of-tree 的包(来源)——所以 bundleslist 多出内置项是正常的。

  2. 反向确认「装了但没生效」:如果某个包在 list 里、却不在 bundles 里,那它就是没声明 dsh.bundle 的普通依赖。dsh plugin 在安装时会为此打一条警告,并且不激活任何配置层(来源)。

  3. 不启动,直接用组合树复核

bash
dsh --profile web --dump-config

每个生效的组合包都会打印出一个 # == <包名> 层,这份输出才是「运行时到底加载了什么」的最终答案(来源)。

按 profile 查 DeepSeek Harness 插件:换名字就看另一份清单

插件是装在 profile 上的,不是装在全局的——dsh plugin --profile <名字> list 会进到 $DSH_HOME/profiles/<名字> 目录执行 pnpm list,换一个名字看到的完全是另一份清单。 多 profile 环境的排查顺序:

  1. 先列出本机有哪些 profile
bash
ls ~/.dsh/profiles
  1. 对候选 profile 逐个查,确认目标插件装在哪一个:
bash
dsh plugin --profile web list
dsh plugin --profile headless list
  1. 判断某个插件「为什么没生效」的方向:先确认它在你实际启动的那个 profile 里(dsh web 用的是 web),否则你只是在另一个 profile 里装了它。

  2. 注意应用参数不在这里dsh plugin 只解析 --profile 并转发其余参数,而 dsh --profile web --port 8080 里的 --port 属于 web 应用——启动器只解析自己的参数,第一个它不认识的词开始就是应用的参数(来源)。

DSH plugin list 注意事项

一句话总结:list 看依赖、bundles 看加载,数字对不上很正常,用 --dump-config 定案。 四条提醒:

  1. 别用 list 的数量当「生效插件数」:它既不包含内置组合包,又会带上没有 dsh.bundle 的库包;
  2. 脚本里用 --json 而不是解析文本:树状输出的缩进和符号会随版本变,--json 稳定得多;
  3. --depth 别乱调大:profile 的依赖树可能很深,--depth Infinity 在插件多时输出会很长,排查用 --depth 0 通常够;
  4. list 是只读的:它不会改 package.jsonpnpm-lock.yaml,放心跑。

懒得对口径?让 DSH Plugin Hub 直接给你一份准数

上面这套「pnpm 依赖 ↔ bundles 清单 ↔ dump-config」的三角对账,图形界面里一步就完成了。 装好 DSH Plugin Hub 后打开设置 → 已安装插件:界面直接给出当前环境的插件列表,带来源标签(目录插件 / 手动安装)、版本号与更新时间,行尾提供「可更新」与「卸载」;搜索、来源筛选、按名称或 Star 排序都现成。与其在命令行里对两份清单,不如让市场直接把「装了什么、能不能更新」摆在一屏里。

已安装插件列表

来源:dsh CLI READMEDeepSeek Harness 官方文档 - 打包与安装插件pnpm list(pnpm ls)命令文档

常见问题

dsh plugin list 输出的插件列表,和 profile 里 dsh.profile.bundles 的清单为什么对不上?

因为两者口径不同:dsh plugin list 列的是 profile 目录里的 pnpm 依赖,dsh.profile.bundles 记的是真正要加载的插件层。内置 bundle 从 dsh 安装本体解析、不进 profile 的 node_modules,所以不出现在 list 里;没声明 dsh.bundle 的库包则会出现在 list 里但不激活任何层。

dsh plugin list 怎么只看直接安装的插件,不显示传递依赖的依赖树?

dsh plugin list 的默认深度就是 --depth 0,只列直接依赖,所以不加参数通常已经是你要的结果。想看完整依赖树用 dsh plugin --profile web list --depth Infinity,想过滤某类包名可以用位置参数,例如 dsh plugin --profile web list "dsh-*"。

怎么用 dsh plugin list 查看某个 profile 装了哪些插件?

换 --profile 的值即可,dsh plugin --profile <名字> list 会到 $DSH_HOME/profiles/<名字> 目录里执行 pnpm list。web 是启动 dsh web 用的内置 profile;要确认某个插件到底装进了哪个 profile,就对每个候选 profile 各跑一次 list 比对。

dsh plugin list 能输出 JSON 给脚本处理吗?

能,dsh plugin --profile web list --json 会把结果以 JSON 格式输出,因为 --profile 之后的参数整体转发给 pnpm,pnpm list 的 --json 直接可用。写检查脚本时配合 --depth 0 拿直接依赖列表最稳,不要靠解析树状文本。

list 里能看到某个插件,为什么启动后它并没有生效?

出现在 dsh plugin list 里却始终不生效,说明你装的是没有声明 dsh.bundle 的包:它只是普通依赖,dsh plugin 会打一条警告且不激活任何配置层。判断办法是执行 dsh --profile web --dump-config,看有没有出现 # == <包名> 那一层;没有就是没挂上配置层。

相关术语

dsh plugin list
dsh plugin list 是查看某个 profile 已安装插件依赖的 DSH 命令,完整形态为 dsh plugin --profile <name> list。它把参数转发给 profile 目录中的 pnpm 执行,等价于在该目录跑 pnpm list(别名 pnpm ls),因此接受 pnpm list 的全部参数。dsh CLI README
dsh.profile.bundles
dsh.profile.bundles 是 profile 的 package.json 里 dsh.profile 清单中的有序组合包数组,决定启动该 profile 时按什么顺序叠加哪些插件层。它由 dsh plugin 维护,不是 pnpm 的依赖字段,因此与 pnpm list 的输出不等价。DeepSeek Harness 官方文档 - 打包与安装插件
内置组合包(in-box bundle)
内置组合包是随 dsh 安装本体一起分发的组合包,例如 @deepseek-ai/dsh-base、@deepseek-ai/dsh-web-app、@deepseek-ai/dsh-headless。它们总是从 dsh 安装本体解析,不进 profile 的 node_modules,所以不会出现在 pnpm list 的输出里。DeepSeek Harness 官方文档 - 打包与安装插件
profile
profile 是 $DSH_HOME/profiles/<name> 下一个可运行的插件组合目录,其 package.json 同时承载 pnpm 的 out-of-tree 插件依赖与 dsh.profile 清单。dsh --profile <name> 启动的就是它。DeepSeek Harness 官方文档 - 打包与安装插件

来源