liyown/dshx--packages-create-dshx ↗★ 7

create-dshx

快速创建插件项目脚手架 适合插件开发者,用于快速生成包含Host和Client入口的规范项目。

套件
create-dshx
相容性
待驗證
版本
0.2.0-preview.0
授權
MIT
最近更新
2026年10月23日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

create-dshx

Create a reproducible DeepSeek Harness plugin project with typed Host and Client entry points.

pnpm create dshx@preview my-plugin
cd my-plugin
pnpm dev

Choose a feature template and an independent Client styling setup:

pnpm create dshx@preview my-plugin --template starter --style css-modules
pnpm create dshx@preview my-plugin --template showcase --style tailwind
pnpm create dshx@preview my-plugin --template starter --style none
  • starter contains one Host Tool and one localized visible Client Slot. Its defineLocale() contribution supplies typed zh/en copy without LocaleNamespaceMap declaration merging.
  • showcase adds a Prompt Section, dynamic Prompt Context, Settings contract, typed API, and Runtime Deck Slot. Experimental Conversation APIs are intentionally excluded.
  • css-modules uses the standard Vite CSS Modules pipeline.
  • tailwind uses Tailwind v4's Vite plugin, CSS-first configuration, a dshx: prefix, and omits Preflight so the plugin cannot reset the shared DSH page.
  • none emits no stylesheet or styling dependency.

Every generated project provides check, build, dev --open, and prepack; prepack runs the offline check and production build through the selected package manager. The initializer refuses to overwrite an existing directory, pins the matching DSHX release, installs the latest verified DSH boundary for local development, and declares the selected providers plus the runtime packages required by the compiled Host. A starter that uses defineLocale() includes the required @deepseek-ai/dsh-client-locale provider edge automatically.

Interactive dependency installation displays an animated status line until the package manager succeeds or fails. The initializer follows the package manager that invoked it (npm create, pnpm create, or Yarn), unless --package-manager explicitly overrides that choice.

Automation

pnpm create dshx@preview my-plugin --yes --no-install
pnpm create dshx@preview my-plugin --package-manager pnpm
  • --yes disables interactive questions.
  • --yes defaults to starter with css-modules when no selectors are passed.
  • --template starter|showcase selects the feature set.
  • --style css-modules|tailwind|none selects the styling setup.
  • --install and --no-install explicitly control dependency installation.
  • --package-manager pnpm|yarn|npm overrides detection.
  • --cwd selects the parent directory.

Package-manager detection checks the explicit flag, existing lockfiles, the nearest packageManager declaration, the invoking package manager, and available commands on PATH, in that order.

See the DSHX documentation and repository for the full development workflow.

MIT © DSHX contributors.