Template registry for np package init. Each template is a complete package scaffold — SDK code on @nullplatform/plugin, its tests and fixtures, a self-contained multi-stage Dockerfile, mise tasks (test/local/dev/build/run/publish), a release workflow, and docs (README.md + AGENTS.md for humans and AI coding tools) — rendered with Go text/template.
np package init --name my-scope --template scope-bun
cd my-scope && np package run # dockerized agent spawns the worker locallyplugin-templates/
├── manifest.yaml # registry: categories, SDKs, templates + variables
└── templates/
└── <sdk>/
└── <category>/
└── ... # template files, rendered with {{ .Var }}
| Category | SDK | Description |
|---|---|---|
| scope | bun | Deployment target plugin (Kubernetes, Lambda, ECS, ...) |
| simple | bun | Custom command handler (health checks, migrations, ...) |
| service | bun | Application dependency plugin (databases, caches, ...) |
| collector | bun | Catalog collector: feed the catalog from a system of record (Kubernetes, GitHub, CMDB, ...) |
- Create a directory under
templates/<sdk>/<category>/with the source files - Use
{{ .Name }}and{{ .Slug }}in file contents and__SLUG__in file paths (everything else — scope category/provider, channel routing/sources, a collector's source — is declared in code via the SDK, the single source of truth) - Register it in
manifest.yamlundertemplates:with the matchingtypeandsdk - Build on the released SDK (
@nullplatform/plugin,^0.2.0): a definition file (defineScope,defineService,definePluginordefineCollector) with its package loaded from the template'spackage.json;src/index.ts,await main(plugin), what the agent or the image runs;src/local.ts, the same with in-memory ports (recordingPlatform().fetch,noopTracing, a collector'sInMemoryIngest) — no environment variable switches a run to local - Test it in-process with
runfrom@nullplatform/plugin/testing, against the template's own fixtures (test/fixtures/) - Add any new variables to the category definition in
manifest.yaml - Include a
README.mdand anAGENTS.md— every scaffold ships docs for people and for AI assistants (Claude Code, Cursor, …)
SDKs are not limited to TypeScript/bun: a template owns its whole build via mise.toml + its Dockerfile, so a Go or Python SDK template plugs in the same way.