Introduction¶
DSH adopts an “everything is a plugin” approach to extend capabilities. When plugin sources are scattered, the plugin list in settings often suffers from a mix of built-in and third-party plugins: finding them is not intuitive, and there are no unified entry points for importing, toggling, or deleting them.
dsh-plugin-optimization is maintained by AJUbest and is positioned as a DSH plugin manager. It splits the plugin list in settings into two partitions: “Built-in Plugins” and “Custom Plugins”. It stores custom plugins uniformly in an independent directory and provides operations such as browsing folders, importing, registering, enabling/disabling, deleting, auto-consolidating, and dependency/conflict checking.
What is it¶
dsh-plugin-optimization is a DSH plugin management component under the MIT license. The core problem it solves is: when maintaining multiple plugins in DSH, it partitions the display of official built-in plugins and custom plugins, and consolidates custom plugins into a fixed directory ~/.dsh/custom-plugins/.
Core Features¶
- Split the plugin list into two partitions: Built-in Plugins and Custom Plugins.
- Custom plugins are stored uniformly in
~/.dsh/custom-plugins/. - Built-in plugins (e.g.,
@deepseek-ai/*) are read-only for browsing. - Browse Folders: Open the Custom Partition or Built-in Partition directory.
- Import: Import Git URLs, local folder paths, or npm package names, and automatically drop them into the custom partition and register them.
- Register / Enable / Disable / Delete custom plugins.
- Automatically archive historical registered plugins into the custom partition.
- Dependency and Conflict Checking: Check for missing dependencies and plugin conflicts and provide reminders.
Installation and Usage¶
First, ensure Node.js and pnpm are installed on your machine, as the dsh plugin command depends on them. If you don’t have pnpm, you can execute:
npm install -g pnpm
You can also use:
corepack enable pnpm
Then, execute the installation command to add the plugin to the web profile:
dsh plugin --profile web add https://github.com/AJUbest/dsh-plugin-optimization.git
After installation, restart the gateway:
dsh-restart
Or restart the launcher. Then refresh the page and go to:
Settings → Plugin Management
After a fresh installation, it is recommended to restart twice: the first time to let this plugin take effect and auto-archive historical plugins, and the second time to let the consolidation results load completely.
Typical Usage¶
Browse Folders¶
Open the Custom Partition or Built-in Partition directory to view, add, or delete plugin files directly.
Import Plugins¶
Enter a Git URL, local path, or npm package name. The plugin will be automatically copied to the custom partition and registered, taking effect after a restart.
Register Plugins¶
If you have manually placed a plugin in the custom partition directory, click “Register” to load it, which takes effect after a restart.
Enable / Disable Plugins¶
Enabling or disabling writes to the cordis.patch.yml disable entry in the profile, taking effect after a restart.
Delete Plugins¶
Deleting will unregister the plugin and remove the plugin directory.
Archive Historical Plugins¶
Click “Archive to Partition” to move historical registered plugins into the custom partition.
Dependency and Conflict Checking¶
Through dependency and conflict checking, check for missing dependencies and verify if there are plugin conflicts and provide reminders.
Uninstallation¶
If you need to remove the manager itself, execute:
dsh plugin --profile web remove dsh-plugin-optimization
Use Cases and Notes¶
Suitable for users who manage multiple plugins in DSH and wish to maintain third-party plugins and built-in plugins separately.
Plugins are loaded with the current DSH process. It is recommended to review the source code and license before installation; this project is under the MIT license.
Note two points regarding usage:
- Only allow calls from the local machine or same host sources.
- Perform containment checks on all paths to prevent directory traversal.
Conclusion¶
The value of dsh-plugin-optimization lies in transforming DSH plugin management from a simple “installation list” into a partitioned daily maintenance workflow: viewing, importing, registering, toggling, deleting, archiving, and dependency/conflict reminders can all be completed from a single entry point.
GitHub Address:
https://github.com/AJUbest/dsh-plugin-optimization
The verified materials for this session do not provide a confirmed directory page URL. If you need to find it through a community directory, please refer to the actual entry point of the directory site.