DeepSeek Harness plugin environment: Node, pnpm, deps

Plugin DevelopmentPublished 2026-09-12Author: DeepSeek Plugin Market
DSH pluginDeepSeek Harnessdevelopment environmentpnpmcreate-dsh-plugin
How to set up a DeepSeek Harness plugin dev environment: Node and pnpm, getting Harness via npx or a source checkout, and the three dependency packages.

A DeepSeek Harness plugin development environment needs only three things: Node.js, pnpm, and a runnable copy of Harness. The official prerequisite is "start from a repository checkout that has completed the run-from-source path," so the first step is not writing code — it is getting pnpm dsh web to run. Every DSH plugin needs the same three things.

DSH plugin development environment checklist: three things

The official prerequisite for plugin development is one sentence: start from a repository checkout that has completed the run-from-source path. Unpacked, that is three things (source):

ComponentPurposeHow to get it
Node.jsRuns Harness and your pluginInstall per the official requirements, minding the scaffolder's engines constraint
pnpmWorkspace dependency management and command prefixThe repo is a pnpm workspace, so commands are pnpm dsh ...
A Harness copyLoads and runs your pluginnpx @deepseek-ai/dsh web or a source checkout

Watch the Node version: the create-dsh-plugin scaffolder declares Node ^22.19.0 || >=24.0.0 in its engines field — an older runtime fails during install (source).

Two ways to get DeepSeek Harness for DSH plugin work

Use npx if you only want to run Harness; use a source checkout to write plugins — because local debugging depends on the checkout directory. The official README offers both (source):

  1. Run the published build (for users): npx @deepseek-ai/dsh web, which you should expect to start the Web UI in one command.
  2. Use a source checkout (recommended for plugin work): git clone https://github.com/deepseek-ai/deepseek-harness.git, then cd deepseek-harness, pnpm install, pnpm run build, and finally pnpm dsh web, which you should expect to start the same Web UI from your own checkout.

Why option 2 for plugin work: the official plugin tutorial creates a scratch-plugin directory from the repository root and mounts the plugin's absolute path through a --patch overlay — plugin paths are resolved from the profile directory, so referencing local files is simplest inside the checkout. The two options coexist: npx for daily use, the checkout for plugin work. For a step-by-step breakdown of the source build, see building from source.

Creating a DSH plugin project: scaffold or hand-write

Use the scaffolder to start fast, or hand-write a single file to understand the mechanics. create-dsh-plugin offers tool / events / webui templates, includes a --verify smoke test, and pins versions with the next tag (source):

  1. Scaffold a project: npx create-dsh-plugin my-plugin -t tool, which you should expect to generate package.json, tsconfig, and template code.
  2. Or hand-write the minimal project, which is one file — create scratch-plugin/src/my-plugin.ts at the checkout root:
ts
import type { Context } from '@deepseek-ai/cordis'

export const name = 'hello-plugin'

export function apply(ctx: Context) {
  console.log('[hello-plugin] plugin loaded!')
}

The only difference is startup speed: the scaffolder brings package.json, tsconfig, and template code, while hand-writing means adding package.json yourself (needed for packaging). For the full walkthrough, see the development tutorial.

Which three dependencies a DSH plugin installs

Dependencies are on demand — a minimal plugin needs only types. The three official packages and their jobs:

PackageProvidesWhen to install
@deepseek-ai/cordisTypes such as Context and ServiceEvery plugin
@deepseek-ai/dsh-toolsdefineTool and tool extension pointsTool plugins
@deepseek-ai/schemasterySchema, for declaring ConfigPlugins that take config

Do not install everything blindly: the type package (cordis) is usually a dev dependency, while what the plugin actually needs at runtime is a package used by apply, such as dsh-tools (source).

DSH plugin environment check: getting this far is enough

The environment is fine not when things are installed, but when a minimal plugin loads. Run pwd at the checkout root for the absolute path and write scratch-plugin/cordis.yml:

  1. Get the absolute path: run pwd at the checkout root, which you should expect to print the path you put in the overlay below.
  2. Write the overlay at scratch-plugin/cordis.yml:
yaml
- insert:
    - id: hello
      name: '/absolute/path/to/deepseek-harness/scratch-plugin/src/my-plugin.ts'
  1. Start Harness with the overlay: pnpm dsh web --patch ./scratch-plugin/cordis.yml, which you should expect to print [hello-plugin] plugin loaded!.

Printing [hello-plugin] plugin loaded! means the environment passes. If nothing prints, check in this order: is the path absolute → did pnpm install finish → does the Node version satisfy engines → did the checkout run pnpm run build. Those four cover the vast majority of environment problems.

After the DSH plugin environment is ready

Once the environment passes, decide the plugin's form and capability placement before writing code. Suggested order: use the development guide to choose function / object / class and where capabilities go, follow how to write a plugin to write it, then run the development spec checklist. For distribution, see packaging into a bundle and publishing to the plugin hub.

FAQ

What do you need locally before developing a DeepSeek Harness plugin?

**A DSH plugin needs three things locally: Node.js, pnpm, and a runnable Harness checkout.** The official "Your first plugin" guide states the prerequisite as starting from a repository checkout that has completed the run-from-source path — in other words, get pnpm dsh web working before writing any plugin code (source: official "Your first plugin").

Should you use npx @deepseek-ai/dsh or a source checkout for DSH plugin development?

**For DSH plugin development, use a source checkout.** npx @deepseek-ai/dsh web suits users who just want to run Harness, since one command starts the Web UI; but local plugin debugging mounts absolute-path source files through a --patch overlay, and the official tutorial creates its scratch-plugin directory from the repository root. The two can coexist: npx for daily use, the checkout for plugin work (source: official README and "Your first plugin").

Which templates does create-dsh-plugin scaffold?

**create-dsh-plugin is the DSH plugin project scaffolder, offering tool / events / webui templates.** It pins versions with the next tag and includes a built-in --verify smoke test. Its package.json engines field requires **Node ^22.19.0 || >=24.0.0**, so check your Node version before installing (source: npm create-dsh-plugin).

Which dependencies does a DSH plugin project need?

**A DSH plugin project installs three kinds of dependencies on demand:** ① @deepseek-ai/cordis for types such as Context; ② @deepseek-ai/dsh-tools for defineTool, needed only by tool plugins; ③ @deepseek-ai/schemastery for declaring a Config schema, needed only when the plugin takes config. All three are on demand — a minimal plugin needs only the cordis types (source: official "Your first plugin" and "Build a tool").

How do you confirm the DeepSeek Harness plugin environment works?

**To confirm a DSH plugin development environment, load a minimal plugin and check the log line.** Write a plugin whose apply only calls console.log, mount it through a --patch overlay, and if that line prints at startup then Node, pnpm, Harness, and the load path are all fine. No packaging is involved, which makes this the cheapest environment check (source: official "Your first plugin").

Related Terms

run-from-source
run-from-source is the prerequisite state for DSH plugin development, meaning Harness runs from a repository checkout: clone, then pnpm install, pnpm run build, and finally pnpm dsh web. The official plugin tutorial requires starting from that state.https://github.com/deepseek-ai/deepseek-harness/blob/master/README.md
pnpm workspace
The DeepSeek Harness source repository is a pnpm workspace, which is why DSH plugin development commands are prefixed with pnpm (such as pnpm dsh web), and local path debugging for a DSH plugin relies on that workspace resolution.https://github.com/deepseek-ai/deepseek-harness/blob/master/README.md
create-dsh-plugin
create-dsh-plugin scaffolds a DSH plugin project. It offers tool / events / webui templates plus a --verify smoke test, and its engines field requires Node ^22.19.0 or >=24.0.0.https://www.npmjs.com/package/create-dsh-plugin
--patch overlay
A `--patch` overlay is a DSH plugin launch option that lets dsh load an extra cordis.yml on top of the current profile to mount a local, unpublished DSH plugin. It contributes configuration only and does not change the profile directory used to resolve module paths.https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/index.md

Sources