Skip to content

Publish to npm as @nostrability/schemata-codegen #9

@alltheseas

Description

@alltheseas

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

  1. Add bin field to package.json pointing to dist/index.js
  2. Ensure files field includes dist/ and package.json
  3. Add shebang (#!/usr/bin/env node) to CLI entry point
  4. npm publish --access public
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions