Introduction¶
Users of DSH largely embrace the “everything is a plugin” philosophy: functionality is mounted on demand and can be removed when no longer needed. However, in practice, enabling or disabling a plugin usually involves opening the profile’s cordis.patch.yml, manually writing disabled: true, and restarting the web service to verify the changes. With a large number of plugins, this process becomes tedious.
dsh-plugin-manager brings this functionality into the web GUI: it lists plugins already downloaded for the current profile, allows one-click enabling/disabling via buttons, and persists changes to the patch file so they take effect immediately. Below is an introduction to its features, installation methods, and usage notes.
What is it¶
dsh-plugin-manager is maintained by Mg-K-Mn. It is positioned as the “Installed Plugin Manager” within the DSH web GUI. It adds a new tab to the settings page, listing plugins already downloaded (installed) for the current profile, and allows you to toggle their enable/disable status at any time without manually editing YAML or restarting the service.
Its changes are persisted to the profile’s cordis.patch.yml, so the state remains even after refreshing or restarting.
It is worth noting: it only handles enabling/disabling at the entry level. For installing and uninstalling plugins, please continue to use the Plugin Market (dsh-webui-market-plugin) or dsh plugin --profile web add/remove.
Core Features¶
- List currently downloaded plugins in the web GUI, displaying package name, version, source spec, and description.
- Each card displays the runtime entries of that package within the Cordis Loader tree (id / module / fiber status).
- One-click enable/disable:
- Disable: Writes
- id: …+disabled: truefor all entries of that package into the profile’scordis.patch.yml. - Enable: Removes the corresponding pure disable lines from both the profile and home level
cordis.patch.yml. - For packages that are “downloaded but not wired,” clicking enable writes the insert lines from the package’s
cordis.patch.ymlinto the profile patch, completing the wiring. - Relies on the built-in
watchUserPatchesHMR of dsh: after the patch file changes, the Loader tree is reassembled, changes take effect immediately without restarting; for plugins involving browser UI, a page refresh is sufficient to see the changes. - Search box filters by package name / description / entry id.
- Expand details to view runtime Loader entries; failed entries are highlighted in red.
- The bottom of the page displays the profile’s composition layers (bundles) in read-only mode, distinguishing between “downloaded dependencies” and “built-in bundles.”
Implementation-wise, the plugin is divided into two halves: the Host half (lib/host.js) registers the /api/dsh-plugin-manager route, reads the profile’s package.json and the package’s cordis.patch.yml, and projects the runtime Loader entries; the Client half (lib/client.js) registers to the settings.plugins.tab slot (order 6, placed after the official plugin list / Plugin Market) to render the frontend panel.
Installation and Enablement¶
The following are three installation methods; choose one as needed.
Method 1: Install from GitHub (Recommended)¶
Execute:
dsh plugin --profile web add github:Mg-K-Mn/dsh-plugin-manager
After installation, restart the web service for it to take effect:
dsh web
Method 2: Install from Local Directory¶
After cloning or downloading the repository, enter the repository root directory containing package.json and execute:
dsh plugin --profile web add .
Note that relative paths are resolved based on the directory where the command is executed: if executed in the parent directory of the repository, write dsh plugin --profile web add ./dsh-plugin-manager. After installation, restart the web service for it to take effect.
Method 3: Manual wiring without restart (Debugging / Immediate use)¶
Place the plugin directory under the profile’s node_modules, and append the following to the end of ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: dsh-plugin-manager
name: dsh-plugin-manager
dsh’s patch HMR will immediately mount the host API. Refresh the browser, and you will see the tab in Settings → Plugins.
Notes when switching installation methods¶
If you have already used Method 3 to add dsh-plugin-manager to the profile’s cordis.patch.yml, please delete the corresponding - insert: block before switching to Method 1 or Method 2 and restarting. Otherwise, the bundle layer and the profile patch will mount this plugin separately, and duplicate registration of the same API route will cause a startup failure.
Daily Usage¶
After completing the installation steps, open Settings → Plugins → Installed Plugins:
- Filter the target plugin by package name / description / entry id in the search box.
- The button on the right side of each card displays “Enable” or “Disable” based on the current state; clicking it applies the change immediately.
- Expand “Details” to view runtime Loader entries; failed entries are highlighted in red.
- The bottom of the page displays the profile’s composition layers (bundles) in read-only mode.
Use Cases and Notes¶
Suitable scenarios: DSH users with a large number of plugins who need to frequently test enabling/disabling; environments where users do not want to repeatedly manually edit cordis.patch.yml, or where they want changes to take effect immediately without restarting the service.
A few notes before use:
- It depends on the
webServer,loader,slots, andwatchUserPatchesbehavior provided by dsh 0.1.0-rc.x; older versions are not guaranteed to work. - The manager itself cannot be disabled by itself; otherwise, you will lose the entry to re-enable it.
- Auto-editing targets only lines that are purely
id+disabled: true. Disabled lines with additional configurations will prompt for manual editing in the UI and will not be deleted arbitrarily; complex overrides applied later in the home-levelcordis.patch.ymlwill not be guessed automatically either; the interface will display them truthfully and prompt for manual handling. - For entries where the runtime has been overridden with additional
configby other patch layers, disabling only addsdisabled: trueand does not affect the original configuration. - Write operations only accept same-origin POST (Origin matches Host), consistent with the strategy of
dsh-webui-market-plugin; the patch file uses a temporary file + rename for atomic writing, and consecutive clicks are serialized by a queue. - The plugin runs with the permissions of the current dsh process. It is recommended to check its source code and license before installing. This project is licensed under the MIT License.
Conclusion¶
dsh-plugin-manager solves a specific, small problem: it turns the enable/disable process for installed plugins from “edit files, restart service” to “click a button,” with changes that are persisted and take effect immediately. For DSH environments where plugins are accumulating, it is a convenient supplement.
Plugin Directory Page: https://www.skillhub.cn/plugins/Mg-K-Mn/dsh-plugin-manager
GitHub Repository: https://github.com/Mg-K-Mn/dsh-plugin-manager
(skillhub.cn is an independent community plugin directory and has no official affiliation with DeepSeek / Shanghai Fanghuang.)