Summary
Publish schemata-codegen to npm so consumers can install it as a devDependency and run it via npx.
Why
Currently the only way to use schemata-codegen is to clone the repo and run it locally. This blocks:
- CI automation in consuming repos (e.g. nostr-watch drift detection:
pnpm generate && git diff --exit-code)
- Easy adoption by app devs (
npx @nostrability/schemata-codegen --schemas ... --all)
- Dependency management via Renovate/Dependabot (auto-bump when codegen publishes a new version)
What's needed
- Add
bin field to package.json pointing to dist/index.js
- Ensure
files field includes dist/ and package.json
- Add shebang (
#!/usr/bin/env node) to CLI entry point
npm publish --access public
- Verify
npx @nostrability/schemata-codegen --help works
Effort: Low | Impact: High
This is a prerequisite for the nostr-watch integration (#8) and any CI automation in consuming projects.
Summary
Publish schemata-codegen to npm so consumers can install it as a devDependency and run it via
npx.Why
Currently the only way to use schemata-codegen is to clone the repo and run it locally. This blocks:
pnpm generate && git diff --exit-code)npx @nostrability/schemata-codegen --schemas ... --all)What's needed
binfield topackage.jsonpointing todist/index.jsfilesfield includesdist/andpackage.json#!/usr/bin/env node) to CLI entry pointnpm publish --access publicnpx @nostrability/schemata-codegen --helpworksEffort: Low | Impact: High
This is a prerequisite for the nostr-watch integration (#8) and any CI automation in consuming projects.