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

cashcn

v0.0.0-alpha.0

Published

Smart `npm fund`: resolve an OSS maintainer/repo/package and open the right funding checkout, pre-filled with amount + recurrence. Routes money, never custodies it.

Readme

cashcn

Ultra-simple payments to OSS maintainers via the CLI — a smarter npm fund.

cashcn resolves a maintainer / repo / package to its funding destinations and opens the right hosted checkout, pre-filled with your amount and recurrence.

npx cashcn <verb> <destination> <amount>[/{m,y}]

It is a discovery + deep-link tool. Money never touches cashcn — it routes you to GitHub Sponsors / Open Collective / Liberapay / etc. with the amount and recurrence already filled in. That is the one shape of this idea that is shippable today with zero PCI/KYC burden (see cashcn.md research for why actually moving the money requires becoming a regulated payment platform).

Why a POC, and what it proves

The research found that reading funding data is easy everywhere but initiating a payment via API is gated on every fiat platform (GitHub createSponsorship is recurring-only and charges the caller's card; Open Collective blocks external Stripe/PayPal charges; thanks.dev / Liberapay have no payment API). What is fully feasible is deep-linking into the hosted checkout with the recipient, amount and recurrence prefilled. This POC demonstrates that end-to-end.

Usage

# verbs are all synonyms (read it like a sentence):
#   pay donate sponsor gift send tip back fund thank support

npx cashcn pay     gh://franky47     100      # one-time $100
npx cashcn sponsor 47ng/nuqs         10/m     # $10 / month
npx cashcn donate  oc://antfu        25/y     # $25 / year
npx cashcn tip     npm://nuqs        5/m      # resolve npm pkg funding

The $ prefix is intentionally dropped — it triggers shell variable expansion. Amounts are plain numbers with an optional /m or /y suffix.

Add --print (or --dry-run) to resolve and build the link without opening a browser — handy for scripting and for seeing what got resolved.

Destinations

| Form | Meaning | |---|---| | gh://<user> | GitHub user → GitHub Sponsors (+ their profile FUNDING.yml) | | gh://<owner>/<repo> | GitHub repo → reads .github/FUNDING.yml | | npm://<pkg> | npm package → reads its funding field, then the repo's FUNDING.yml | | oc://<slug> | Open Collective collective | | <user> | shorthand for gh://<user> | | <owner>/<repo> | shorthand for gh://<owner>/<repo> |

Scoped npm packages need the explicit scheme: npm://@scope/pkg.

How it works

  1. Parse the destination (src/destination.js) and amount (src/amount.js).
  2. Resolve funding targets (src/resolve.js) by unioning:
    • the npm registry funding field,
    • .github/FUNDING.yml (src/funding-yml.js, a minimal parser),
    • GitHub Sponsors directly for a bare user.
  3. Rank targets by how well each can be pre-filled (src/platforms.js): Open Collective > Liberapay > GitHub Sponsors > profile-only. Liberapay is recurring-only, so it's demoted for one-time payments.
  4. Build the deep-link with amount / interval / frequency injected where the platform supports it, and open it (src/open-url.js).

GitHub Sponsors tier resolution

GitHub has no free-form amount query param — you can only deep-link to a specific tier, identified by a numeric tier_id. cashcn resolves the tier whose price exactly matches your amount (src/github-tiers.js), trying in order:

  1. gh CLIgh api graphql lists every tier with its node id (decoded to the numeric tier_id). Authoritative; used when gh is installed + authed. An exact match deep-links to that tier (so the sponsor lands on its rewards).
  2. Public-page crawl — scrapes github.com/sponsors/<login> for the tier_id ↔ price pairs. Token-free fallback when gh isn't available.
  3. Custom amount — if no exact tier matches, pre-fill a free-form amount on the /sponsorships checkout (?frequency=…&amount=…). GitHub honours this as long as the maintainer has custom amounts enabled.

One-time and monthly tiers have different ids, so pay … 10 and sponsor … 10/m resolve to different tiers. GitHub has no yearly tier, so /y skips the lookup.

Pre-fill capability (per research)

| Platform | Amount | Recurrence | Notes | |---|---|---|---| | Open Collective | ✅ | ✅ | ?amount=&interval=month\|year | | Liberapay | ✅ | ✅ | recurring-only; currency required or amount is dropped | | GitHub Sponsors | ✅ | ✅ | exact-amount tier → tier_id, else custom amount (see below) | | Patreon / Ko-fi / Buy Me a Coffee / Polar | ❌ | ❌ | opens the profile page only |

Limitations (it's a POC)

  • FUNDING.yml parser handles the flat key: value / key: [a, b] shape only — not arbitrary YAML. Swap in a real parser for production.
  • No ecosyste.ms aggregator backstop, no funding.json (floss.fund) source yet — both are noted in the research as worthwhile additions.
  • GitHub tier resolution matches the amount exactly; it doesn't snap to the nearest tier (that would silently change what you pay). Tier lookups aren't cached, so each GitHub deep-link makes one gh/HTTP call.
  • Zero runtime dependencies on purpose, so npx-from-source has no install step. (The tier lookup shells out to gh only if it's already on your PATH.)

Run from source

node bin/cashcn.js sponsor 47ng/nuqs 10/m --print