Jesse-njx/dsh-plugin-manager
dsh pm — discover, install, update, and manage dsh plugins from the CLI: multi-source search (awesome list + GitHub + npm), doctor audit, per-profile state
已收录
1
Market
Bundle 已验证
功能介绍
`dsh pm` 插件管理器:多源搜索(awesome 列表 + GitHub + npm)、按 profile 安装/移除/更新,以及 doctor 审计(清单、bundle patch、版本漂移)。
适合
- 需要从 awesome 列表、GitHub 和 npm 发现并管理插件的 DSH 用户。
- 需要跨多个 DSH profile 管理已安装插件的团队。
- 需要审计插件清单、bundle patch 以及 npm 或 GitHub 版本漂移的维护者。
不适合
- 运行 Node.js 20 以下版本的环境。
- 非 DSH 插件生态,或不使用 DSH profile 的工作流。
- 期望 `gitInstall.depth` 或 `gitInstall.build` 影响安装行为的用户;这些配置目前不会传给 `dsh plugin add`。
README
dsh Plugin Manager
dsh-plugin-manager adds the dsh pm command group for discovering, installing, removing, listing, updating, and auditing dsh plugins. Version 0.1.0 requires Node.js 20 or later and integrates with Cordis and dsh commands.
Capabilities
- Searches the awesome-dsh-plugin list, GitHub repositories with the
dsh-plugintopic, and npm keyword results. - Merges and deduplicates discoveries by repository URL and canonical name.
- Falls back independently per registry source and can use cached results when a source is unavailable.
- Installs npm packages and GitHub repositories into one or more dsh profiles.
- Removes plugins through the documented
dsh pluginflow. - Lists installed plugins by profile and checks for newer npm versions or GitHub revisions.
- Audits installed plugin manifests, bundle patches, and version state with
dsh pm doctor. - Maintains side-band JSON state without directly editing a profile’s
cordis.yml.
Commands
The bundle exposes these command operations:
dsh pm searchdsh pm installdsh pm removedsh pm listdsh pm updatedsh pm doctor
Installation and removal delegate to the standard profile-aware dsh commands:
dsh plugin --profile <profile> add <ref>
dsh plugin --profile <profile> remove <id>
Accepted install references include scoped npm package names, owner/repo, and github:owner/repo. Registry entries may also resolve a name to an npm package or GitHub repository.
Configuration
The bundle registers @dsh-pm/cli as dsh-plugin-manager. Its configuration supports registry sources, target profiles, a state file, and Git installation preferences:
- id: dsh-plugin-manager
config:
registry:
awesomeUrl: https://raw.githubusercontent.com/awesome-dsh-plugin/awesome-dsh-plugin/main/README.md
npmKeyword: dsh
profiles: [default]
stateFile: ~/.dsh/pm/plugins.json
gitInstall:
depth: 1
build: true
The gitInstall settings are retained in the configuration contract but are not passed to the current dsh plugin add command.
State and Cache
Installed state is stored as schema-validated JSON, with one record per plugin and profile. Writes use a temporary file followed by an atomic rename. The default state path shown by the bundle is ~/.dsh/pm/plugins.json.
Registry cache location is selected in this order:
DSH_PM_CACHE_DIR$XDG_CACHE_HOME/dsh-pm~/.cache/dsh-pm
Cache failures do not fail a search.
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:Jesse-njx/dsh-plugin-manager。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。