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

@oliviersm199/rate-card-sync

v0.1.3

Published

CLI to extract and sync billing rate card pricing as YAML. Metronome supported today.

Readme

Rate Card Sync

CLI to extract and sync billing rate card pricing as YAML. Metronome is supported today.

Install

npm install -g @oliviersm199/rate-card-sync

Or run without installing:

npx @oliviersm199/rate-card-sync extract --rate-card "Standard rate card"

Authentication

Set a Metronome API bearer token:

export METRONOME_BEARER_TOKEN="your-token"

Commands

Extract

Pull the current rate card from Metronome into YAML:

rate-card extract --rate-card "Standard rate card" --out rate-card.yaml

Omit --out to print to stdout.

Sync

Apply a YAML spec to Metronome:

rate-card sync rate-card.yaml

Preview changes without applying:

rate-card sync rate-card.yaml --dry-run

Exit with code 2 when changes are pending (useful in CI):

rate-card sync rate-card.yaml --dry-run --exit-code

YAML spec

provider: metronome
rateCard:
    name: Standard rate card
rates:
    - product: GPT-5 input tokens
      rateType: FLAT
      price: 500
      entitled: true
      startingAt: "2026-06-19T00:00:00.000Z"
      pricingGroupValues:
          region: us-west-2
      billingFrequency: MONTHLY
    - product: LLM output tokens
      rateType: FLAT
      price: 0
      entitled: true
      commitRate:
          rateType: FLAT
          price: 1200
  • provider defaults to metronome
  • rateCard requires name or id
  • startingAt is optional on sync; defaults to now
  • price is in the credit type's base unit (e.g. USD cents)
  • commitRate sets the rate charged when usage is drawn down against a commit or credit; the list price is often 0 when pricing is defined here

See examples/rate-card.yaml for a full sample.

GitHub Actions

Copy the workflows in examples/github-actions/:

  • validate.yml — run sync --dry-run --exit-code on pull requests to gate pricing drift
  • sync.yml — apply changes when the spec changes on main

Both workflows expect a METRONOME_BEARER_TOKEN repository secret and reuse the repo's CI workflow as a quality gate.

Development

npm install
npm test
npm run coverage
npm run build

Limitations

Need something not listed here? Open a GitHub Issue describing your use case (use a Feature Request) — additional rate types and capabilities can be added on request.

  • Rates only — does not create, update, or archive products, rate cards, credit types, or pricing units (they must already exist in Metronome)
  • Single rate card per spec file
  • FLAT is the first-class rate type; PERCENTAGE, SUBSCRIPTION, TIERED, TIERED_PERCENTAGE, and CUSTOM are preserved on extract and passed through on sync.
  • Append-only sync — never deletes or ends existing rates; rates in Metronome but absent from YAML are reported as warnings only
  • commitRate (the rate applied when consuming a commit or credit) is extracted and synced; other contract-level overrides are not handled
  • Diff identity is limited to product + pricingGroupValues + billingFrequency
  • Metronome is the only supported provider today. If you would like to see another provider, please create an issue.
  • Rates are the only declaratively managed resource today; products, credit types, and pricing units must already exist. The architecture supports adding them later as new resource modules without breaking existing specs

License

MIT