← Back to home@bigstyle777

dshp

πŸ› οΈ Scaffold, verify & ship DeepSeek Harness plugins β€” Windows-safe paths, version-family pinning, boot-free verify. npx dshp-cli create my-plugin

Stars
0
Language
TypeScript
Created
Aug 18, 2026
Updated
Aug 18, 2026
GitHub repo

Introduction

dshp β€” DeepSeek Harness Plugin Toolkit

English | δΈ­ζ–‡

npm node license

Scaffold, verify, and ship DeepSeek Harness plugins β€” without stepping on the platform's known landmines.

Writing a DSH plugin from scratch means learning the Cordis lifecycle, the bundle/profile manifest split, patch-layer composition, and β€” as we discovered while building this tool β€” several undocumented Windows and npm-tag traps. dshp encodes all of that into one command:

npm create dshp-cli@latest my-plugin   # or: npx dshp-cli create my-plugin
cd my-plugin
npx dshp verify                       # βœ“ boot-free, no API key needed

Why dshp?

Pain (found the hard way)What dshp does
@deepseek-ai/dsh-tools latest tag is stale (0.0.1-rc.1 vs 0.1.0-rc.7); the two families' peers are mutually incompatiblePins the whole dependency family as one group (dsh-*, cordis, schemastery) per template; upgrade moves the group atomically
Windows: a plain C:/... path in a patch file crashes the loader with ERR_UNSUPPORTED_ESM_URL_SCHEMEGenerates file:/// URLs (spaces auto-encoded) in every dev overlay
Windows: dsh plugin add <path with spaces> breaks β€” the path gets split by the shell and pnpm tries to install "SOLO"Source-mode launcher spawns node directly (no shell), letting Node quote args; shell mode is refused loudly with a fix hint instead of failing silently
pnpm β‰₯10 blocks esbuild install scripts β†’ fresh pnpm install failsTemplates ship a settings-only pnpm-workspace.yaml with the right allowlist
No way to check a plugin "would load" without booting the whole app (and an API key)verify composes the real profile via dsh --dump-config and asserts your plugin's rows are in the tree β€” seconds, zero keys

Commands

CommandWhat it does
dshp create <dir>Generates a plugin project: tool or service template, bundle manifest (dsh.bundle), cordis.patch.yml, dev overlay, tsconfig, pnpm settings, README
dshp devBoots dsh web with your dev overlay β€” TS source runs directly, edits hot-reload via HMR
dshp verifyTwo layers: structural checks (L1) + real profile composition assertion via --dump-config (L2). --dev verifies the source-run overlay
dshp upgradeRewrites peer/dev deps to a newer family (reads live npm dist-tags). --check for CI
dshp versionsShows built-in families vs. live npm dist-tags
dshp create my-plugin --template tool --tag next
dshp create my-plugin --template service
dshp dev                     # http://127.0.0.1:3080 with your plugin live
dshp dev -- headless         # no-UI run
dshp verify                  # after pnpm build (bundle form)
dshp verify --dev            # source form, pre-build
dshp upgrade --check         # CI: exit 1 when updates exist

Finding your dsh

dshp locates dsh automatically, in order:

  1. DSHP_DSH_BIN β€” full custom command, e.g. node --import tsx/esm <repo>/apps/cli/src/bin.ts
  2. DSHP_DSH_ROOT β€” a deepseek-harness source checkout (run from source, no build needed)
  3. A sibling deepseek-harness/ directory next to dshp
  4. A globally installed dsh on PATH

Publish your plugin

Templates default to the prebuilt npm route β€” users install compiled output and never touch build-script allowlists:

pnpm build && npm publish

Users then install into any profile:

dsh plugin --profile my add your-plugin
dsh --profile my --dump-config   # see the layer land

Requirements

  • Node.js β‰₯ 20 (DSH itself wants β‰₯ 22.19)
  • pnpm β‰₯ 10 (templates rely on its settings-file behavior)
  • A dsh β€” from source or npm

Roadmap

  • dshp test β€” harness-level test runner with mocked tool registry
  • Multi-file plugin templates (tool + UI card)
  • Windows bug-fix PRs upstream to deepseek-harness (tracked in docs/windows-bugs.md)

License

MIT