Three files suffice. What follows was measured working and can be copied.
1. package.json
{
"name": "dsh-plugin-hello",
"version": "0.0.1",
"type": "module",
"main": "lib/index.js",
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
}2. cordis.patch.yml
# insert one entry into the profile root
- insert:
- id: hello-world
name: 'dsh-plugin-hello'3. lib/index.js
export const name = 'dsh-plugin-hello'
export function apply(ctx) {
// your logic
}Install into an isolated environment
dsh plugin --profile web add "file:C:/path/to/minplug"
Measured at 3.1 seconds. package.json gains "dsh-plugin-hello": "file:C:/..." under dependencies, and the same name is appended to bundles.
Two verifications, both required
- Verify composition:
--dump-configshould show a# == dsh-plugin-hellosection and a- id: hello-worldentry. - Verify real loading: have apply write a file (appendFileSync) and check whether it appears after boot.
Do not conflate id and name
In the patch, id: hello-world is your own targeting label; name: dsh-plugin-hello is the module. To patch that entry later you use the id. The ecosystem routinely mixes the two up.