When the manifest changes,
the build fails.
promptregistry turns a static JSON manifest into typed,
greppable named imports with a committed lockfile. A PM removes a
variable from the remote prompt — your tsc --noEmit catches it before it reaches the model.
$ npm install @nkwib/promptregistryStatic manifest
Host manifest.json on GitHub raw, a release asset, or any
public bucket. Each entry has a name, version, template, and delimiter.
No backend, no hosted UI.
Named imports, not strings
Codegen emits a registry.ts barrel with one named export
per prompt. Refactor-safe, jump-to-definition works, and missing
variables are tsc errors at the call site.
Lockfile-gated
prompt-lock.json pins every entry to its content hash. promptregistry check fails loudly when the remote was
edited without a version bump — the build is the integrity gate.
Sixty-second walkthrough
- Author Drop a
manifest.jsonwith acustomer-summaryentry. - Generate Run
npx promptregistry codegen— emits one runtime.tsper prompt and a typed barrel. - Consume
import { customerSummary } from './prompts/.generated/registry.js'and call.with({...}). - Guard Wire
"typecheck": "promptregistry check && tsc --noEmit"inpackage.json. Done.