Introduction¶
In DSH, plugin states are often scattered across profile files: dependencies and dsh.profile.bundles in profiles/<profile>/package.json, as well as cordis.patch.yml. If you need to move a set of installed plugins to another environment, manually copying these files is prone to omissions.
dsh-plugin-sync does something straightforward: it synchronizes the current profile’s plugin list to a GitHub Gist, and then imports and executes pnpm install on the target environment.
What is this¶
dsh-plugin-sync is a DSH plugin maintained by AngLi1997 with an MIT license. It organizes the current profile’s plugin list into dsh-plugins.json and performs export and import via GitHub Gist.
After installation, it can be viewed in dsh-market.
Core Features¶
GitHub Login¶
Uses GitHub OAuth device flow for quick login, no need to manually paste tokens.
GitHub authorization only requires gist permission.
Export¶
Packages dependencies from profiles/<profile>/package.json, dsh.profile.bundles, and cordis.patch.yml into dsh-plugins.json, and uploads it to a Gist.
Import¶
Reads the plugin list from a Gist, writes it back to package.json / cordis.patch.yml, and automatically executes pnpm install.
After the import is complete, it will prompt to restart Harness for changes to take effect.
Gist Creation¶
When a Gist address is not specified, it will create a private Gist named dsh_plugin_sync_XXXX.
Installation and Enabling¶
Install using the DSH plugin command:
dsh plugin --profile web add dsh-plugin-sync
After installation, it can be viewed in dsh-market.
Alternatively, manually edit the profile’s package.json, add dsh-plugin-sync to dependencies and dsh.profile.bundles, and then execute:
pnpm install
Restart Harness after execution.
Typical Usage¶
- Open Settings → “Plugin Sync”
- Click “Login GitHub”, follow the prompts to jump to GitHub authorization, only requires
gistpermission. - Click “Export to Gist” to upload the plugin list; if the Gist address is not filled in, it will create a private Gist named
dsh_plugin_sync_XXXX. - Click “Import from Gist”, fill in the Gist address to automatically install, and prompt to restart Harness.
Applicable Scenarios and Notes¶
- Suitable for scenarios where you need to synchronize the DSH plugin list across different machines or different development environments.
- The plugin runs with the permissions of the current
dshprocess; you should check the source code, license, and dependencies before installing. The license for this plugin is MIT. - The import process will automatically execute
pnpm install; it is recommended to confirm the Gist content is trustworthy before execution. - Regarding dependency handling,
@deepseek-ai/*andreactare kept as external dependencies, whilezodis bundled into the output;@deepseek-ai/*andreactinpeerDependenciesinpackage.jsonare both marked as optional.
Conclusion¶
The value of dsh-plugin-sync lies in turning the synchronization of the profile plugin list into a repeatable export/import process, rather than manually copying JSON and patch files.
After installation, you can view it in the DSH community directory / dsh-market; GitHub repository address: dsh-plugin-sync.