npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opsydyn/governator-cli

v0.2.0

Published

Bun CLI for design system governance, evidence, and release checks.

Readme

@opsydyn/governator-cli

Bun CLI for local governance reports, source-bound Vitest checks, declaration compatibility and snapshot export. Published as 0.1.0 on npm. Bun >=1.4.2 is required; Node runtime compatibility is not claimed. The private engine and Effect are internal implementation details.

Consumer quick start

Install the CLI in your project:

bun add --dev @opsydyn/[email protected]
bun ./node_modules/.bin/governator validate
bun ./node_modules/.bin/governator evaluate --format json --report-schema 2 > artifacts/governance.json

Before running these commands, configure the project's canonical governance/components.yaml, governance/policy.yaml and optional evidence/waivers, using the minimal example below and adapting paths, ownership and requirements to your project. Create and Git-ignore artifacts/ before redirecting output. There is no automatic initialization command. Normal evaluation requires Git and a clean, committed source tree; consumed governance files must be tracked.

A minimal governance/components.yaml can use JSON syntax (valid YAML):

{
  "schemaVersion": 1,
  "components": [
    {
      "id": "ui.button",
      "name": "Button",
      "package": "@example/ui",
      "owners": ["@design-system"],
      "lifecycle": "stable",
      "source": "src/Button.tsx",
      "stories": ["src/Button.stories.tsx"],
      "contractVersion": "1.0.0",
      "exportPath": "@example/ui"
    }
  ]
}

A deliberately limited local unit-test policy in governance/policy.yaml:

{
  "schemaVersion": 1,
  "policyVersion": "local-unit-v1",
  "requirements": {
    "stable": {
      "checks": [{ "id": "unit-test", "acceptedProducers": ["vitest"], "maxAgeHours": 24 }]
    }
  },
  "transitions": {
    "draft": ["candidate"],
    "candidate": ["stable"],
    "stable": ["deprecated"],
    "deprecated": ["retired"],
    "retired": []
  },
  "waivers": { "enabled": false, "maxDurationDays": 14, "disallowFor": ["ownership"] }
}

For governance/tests.json, map actual tests to the same component ID:

{
  "schemaVersion": 1,
  "mappings": [{ "componentId": "ui.button", "files": ["tests/button.test.ts"] }]
}

This example declares local unit-test readiness only. It does not establish production acceptance or real design/reviewer approval. Source, story and test paths must exist in your project.

For locally produced unit-test evidence, install and declare Vitest 4 in the consumer project, track a root vitest.config.ts, the tests, governance inputs and governance/tests.json mappings, then commit those inputs. Keep generated artifacts/ ignored. Use a full Git checkout without submodules, clean/process filters or hidden index changes (assume-unchanged/skip-worktree):

bun ./node_modules/.bin/governator check --mapping governance/tests.json --format json --report-schema 2 > artifacts/governance.json
bun ./node_modules/.bin/governator snapshot export --report artifacts/governance.json --out artifacts/governance-snapshot.json

check executes the consumer's installed test/config code with Bun, rechecks clean source, and retains raw Vitest output and a receipt under ignored artifacts/. The policy must accept producer vitest for unit-test; passing tests cannot waive other requirements. A saved receipt or imported report does not recreate in-process trust. Snapshot export runs no producers, creates a new file exclusively, and requires a fresh filename for each export. To serve it, install the locally packed @opsydyn/governator-mcp package and run bun ./node_modules/.bin/governator-mcp --root /absolute/path/to/consumer --snapshot artifacts/governance-snapshot.json.

Reports default to schema 1; --report-schema 2 adds evidence metadata without changing readiness or trust. Use schema 1 for older readers. Exit codes are 0 satisfied, 1 blocked/insufficient evidence and 2 invalid input/runtime error. A valid report can record a blocked gate. JSON metadata does not authenticate evidence; local checks and saved snapshots do not establish approval, publication or deployment.

Independent packed consumer qualification and real registry installation are separate release gates. Local or reconstructed package sources must be identified in qualification evidence. Additional repository-only documentation is located at docs/test-evidence.md, docs/storybook-contracts.md and docs/mcp.md in the source checkout; those files are not included in this tarball.

The CLI uses the pinned Effect command parser with Bun platform services internally. Its existing commands and exit codes remain the consumer contract; Effect is bundled rather than required as a consumer peer.