Introduction¶
After installing or updating a DSH profile bundle plugin, you need to restart the dsh web process for changes to take effect. Manually, this usually involves stopping the current web process, then re-running dsh web, and finally refreshing the browser.
dsh-reloader encapsulates this step into the dsh_reload tool, callable by DSH, to automatically restart the web interface after plugin changes, reducing the need for manual Ctrl+C.
What is this¶
lin-cheng-lab/dsh-reloader is a DSH plugin designed to reduce the manual restart cost after installing or updating plugins. It restarts the dsh web process listening on port 3080 via the dsh_reload tool, allowing new plugin changes to take effect after refreshing the page.
The license mentioned in the documentation is MIT.
Core Features¶
The following introduces the capabilities explicitly stated in the documentation:
- After installing or updating a plugin, you can trigger the restart process by saying “Help me reload” to DSH.
- After calling
dsh_reload, the process automatically restarts after 6 seconds, restoring the page upon refresh. - Locate the current
dsh webprocess by port 3080 usinglsof, verify the command line containsdshusingps, and then executekill. - Wait for the port to be released, with a maximum wait time of 15 seconds.
- Restart
dsh webusingnohup, writing logs to~/.dsh/web.log. - Execute the restart via a background detached process using
ctx.shell, returning immediately after the tool is called.
Installation and Usage¶
First, install it to the web profile used in the documentation examples:
dsh plugin --profile web add "github:lin-cheng-lab/dsh-reloader"
If installing from local source code:
dsh plugin --profile web add "file:/path/to/dsh-reloader"
The first time you use the dsh_reload tool requires a manual restart. After that, the reload process will automatically restart.
It has been verified that the documentation only provides examples for --profile web and does not explain applicability to other profiles.
Typical Usage¶
After installing or updating a plugin, you can say to DSH:
Help me reload
The execution order provided by the documentation is as follows:
- Wait for 6 seconds.
- Locate the current
dsh webprocess by port 3080 usinglsof, verify the command line containsdshusingps, and thenkill. - Wait for the port to be released, with a maximum wait time of 15 seconds.
- Restart
dsh webusingnohup, writing logs to~/.dsh/web.log.
After completion, simply refresh the page.
If the tool reports an error, you can still restart manually: Press Ctrl+C in the terminal to stop the current process, then run:
dsh web
Safety Boundaries and Troubleshooting¶
- Only kill processes listening on port 3080 and whose command line contains
dsh. - Only affects the
dsh webprocess listening on port 3080 and does not touch other programs. - If the restart fails, you can check the logs:
~/.dsh/web.log
- The plugin runs with the permissions of the current
dshprocess; you should check the source code and license before installing.
Development Dependencies¶
If you need local development, the commands provided in the documentation are:
npm install --legacy-peer-deps
npm run build
The first is to install typescript and skip unpublished @deepseek-ai peer dependencies; the second is to execute the build.
Type resolution depends on @deepseek-ai/cordis and @deepseek-ai/dsh-tools from the local DSH installation. The listed peer dependencies are:
@deepseek-ai/cordis ^4.0.1
@deepseek-ai/dsh-tools ^0.1.0-rc.6
Conclusion¶
dsh-reloader solves a very specific problem: after installing or updating a plugin, there is no longer a need to manually stop and re-run the web process.
The current documentation does not provide a directory page URL; the GitHub repository address is as follows:
https://github.com/lin-cheng-lab/dsh-reloader