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

idlepay

v0.1.4

Published

Get paid while Claude Code thinks — one sponsored line in your statusline, 50% of ad revenue

Downloads

1,020

Readme

IdlePay client

The IdlePay CLI + statusline client (see ../DESIGN.md). Zero dependencies, Node ≥ 18. Talks to the real API server in ../server/ (Node ≥ 22.5).

What's here

| Path | Role | |---|---| | src/statusline.mjs | Hot path. Copied to ~/.idlepay/ at init; prints your existing statusline + one ad line; heartbeats; lazily spawns the refresher. No network, never throws. | | src/refresher.mjs | Background worker. Detects wait states (transcript mtime), accrues 5-second impressions, spools + batch-uploads events, syncs ads every 60 s, self-exits after 10 min idle. | | src/settings.mjs | Patches/restores ~/.claude/settings.json with a verbatim backup. | | bin/idlepay.mjs | CLI: init · off [--1h\|--today\|--here] · on · status · uninstall. | | test/smoke.mjs | Sandboxed e2e test against the real server (fake ~/.claude, fake transcript). npm test. |

Try it for real (your actual Claude Code)

npm run server                         # terminal 1 — real API, dev-mode auth, landing on :4848
node bin/idlepay.mjs init              # terminal 2 — device-flow login, patches ~/.claude/settings.json (backed up)
claude                                 # open any Claude Code session, ask it something
node bin/idlepay.mjs status            # watch impressions/earnings accrue
node bin/idlepay.mjs uninstall         # byte-exact restore, removes ~/.idlepay, deregisters device

Sandboxed instead (no real settings touched): npm test.

Known gaps deferred from code review (fix before real money)

  • Spool overflow drops newest events (design says drop oldest).
  • Heartbeat file is read-modify-write; concurrent sessions can briefly lose each other's heartbeat (self-heals ≤5 s). Production: per-session heartbeat files.
  • Byte-exact restore overwrites settings changes the user made after init.
  • Stale ad cache blanks at 10 min instead of the design's 1 h stale-serve window.
  • Pid-reuse can suppress refresher respawn until the squatter pid exits.
  • An impression's 5 s accrual can span an ad rotation boundary.

Remaining simplifications vs DESIGN.md

  • GitHub device flow is implemented end-to-end but needs a registered OAuth app (GITHUB_CLIENT_ID on the server); without it the server runs dev-mode auth.
  • Settings patcher handles plain JSON only (production: JSONC-preserving editor).
  • Wait-state detection uses transcript mtime only (no done-flag read yet).
  • No re-assert after Claude Code updates, no killswitch restore path (freeze only).