Export Plugins: Export installed DSH plugins as installable packages

Preface

DeepSeek Harness (DSH) is built on the philosophy of “everything is a plugin.” Installed plugins, workspace checkouts, and official bundles all exist as local directories or links. When you need to back up, migrate, or reuse a particular plugin, manually copying files is both tedious and prone to missing critical configurations. The Export plugins plugin adds an “Export plugins” action on the Plugins page, supporting multi-selection, generating independent directories by package name, and packaging installed plugins into offline-installable local bundles.

Plugin Identification & Author

Export plugins is a DSH plugin that exports installed plugins as standalone local bundle directories. It is maintained by kota-rina3, open-sourced under the MIT license.

Core Features

  • Export any installed plugin: including profile-installed plugins, linked workspace checkouts, and official bundles bundled at install time.
  • Multi-selection & filtering: select plugins via checkboxes in the export dialog, with support for filtering, “Select all,” and “Clear.”
  • Independent directories by package name: each plugin is written to its own subdirectory, preserving scope (e.g., @local/xxx, @liustack/yyy) to avoid conflicts between different package names.
  • Native directory picker: clicking “Browse…” invokes the system directory selector, with a default target of ~/plugin-exports.
  • Bilingual UI: available in both English and Simplified Chinese.
  • No build step required: implemented in pure JavaScript with no build toolchain needed.

Installation & Activation

Install from a local directory:

  1. Open the Plugins page in DSH.
  2. Open the Add plugin menu and select the local-directory installation method.
  3. Point to the plugin-export folder where the plugin resides and confirm.

After installation, the plugin will be listed as @local/plugin-export. Refresh the page once to load the client. There is no need to construct a dsh plugin add github:... command; simply follow the DSH local directory installation flow.

Typical Usage

  1. Open the Plugins page.
  2. Click the Add plugin menu (+ / ▾) and select Export plugins.
  3. Check the plugins you want to export. You can use the filter or Select all.
  4. Choose the target directory: the default is plugin-exports (under Home), or select a system directory via Browse….
  5. Click Export.

After export, each plugin is placed in a subdirectory named after its package name:

plugin-exports/
├─ @local/
│  ├─ account-balance/
│  │  ├─ package.json
│  │  ├─ index.js
│  │  ├─ client.js
│  │  ├─ cordis.patch.yml
│  │  ├─ locale/
│  │  └─ docs/
│  └─ plugin-export/
└─ @liustack/
   └─ modlens/

Unscoped packages are written to the <target>/dsh-context directory.

Reinstalling an Exported Plugin

The export directory is a complete, installable bundle. To reinstall:

  1. If a plugin with the same name is already installed, run remove_bundle first to uninstall it.
  2. Run install_bundle on the exported subdirectory, e.g., plugin-exports/@local/account-balance.

How It Works

  • Host (index.js): Provides the pluginExport service via ctx.effect → ctx.provide, carrying the runtime Typert Remote marker so that the Typert Gateway can directly declare the pluginExport/listPlugins and pluginExport/exportPlugin endpoints.
  • Client (client.js): Registers a menu row in plugins.add.actions, registers a dialog host in shell.overlay, and calls the above endpoints via RPC over the /api connection.
  • Discovery order: Scans in priority order — profile node_modules (from DSH_PROFILE_DIR, or DSH_HOME/DSH_PROFILE, or ~/.dsh/profiles/*/node_modules), the module’s own location (linked profile install or workspace checkout), and the installation package tree — ensuring discovery even when DSH_* environment variables are absent.
  • Export layout: Each plugin’s files are written to <target>/<package-name path>. During export, package.json is rewritten to preserve identity and DSH wiring (name, dsh.bundle, dsh.client, exports, files), while removing dependencies and scripts, so the result is directly installable as a local bundle. Runtime files are also copied: index.js, client.js, cordis.patch.yml, locale/*.json, docs/**, icon.svg, and README.md (if present).

Limitations & Notes

  • Only files present in already-installed packages are exported; no build steps are executed.
  • package.json intentionally excludes package manager metadata (dependencies, lockfiles, scripts) to ensure the export is a clean bundle.
  • Verified on Windows Desktop. The implementation uses Node path APIs, so it is theoretically compatible with macOS and Linux, but has not been verified on a per-platform basis.

Use Cases

Suitable for developers and users who need to back up locally, migrate across machines, or reuse installed DSH plugins offline. Before use, please review the source code and license to ensure it fits your use case.

In Short

Export plugins exports installed DSH plugins as installable local bundles, with multi-selection, independent directories by package name, and a native directory picker — ideal for backup and migration. Directory page: https://www.skillhub.cn/plugins/kota-rina3/plugin-export; GitHub: https://github.com/kota-rina3/plugin-export.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye