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

compiling

v0.1.3

Published

Local companion for compiling.games — play snake, 2048, and rain right in your terminal, and let the site chime when your agent finishes.

Readme

compiling

Local companion for compiling.games — cozy browser games for the gaps while your code compiles or your coding agent runs.

npx compiling

opens a cozy arrow-key menu of everything right in your terminal — one row per game (·d marks a daily: Enter free-plays, d plays the daily), what plays right here, what opens in your browser, and the recorded ambience beds. A "got 2 minutes?" row up top names a pick (got 2 minutes? → Golf) — Enter runs it in the terminal when nothing is linked, r re-rolls. / filters the list live (same fuzzy matching as the site's ⌘K palette; Esc clears), and D/2/5/3 are canned views: dailies, 2-minute, 5-minute, 30-second games. Enter does the best available thing: a linked tab gets driven (the status line then shows what it's playing), a terminal-playable game runs right here, an ambience bed loops locally while the menu stays open (+/- nudge the volume — local bed or driven site mixer alike — Enter stops it, quitting stops it — no daemons), anything else opens the site. When no relay or tab is linked, a quiet Setup section offers to fix it in place (s jumps to it); once healthy it disappears. The list comes from the site's own catalog.json, so it's never stale — and it carries the current CLI version, so quitting the menu prints one quiet line when a newer compiling exists (npx caches forever; nothing else would tell you). q quits; piped or --help prints plain usage instead. Point it at a dev server with COMPILING_SITE=http://localhost:3000.

npx compiling setup

walks you to a linked, chiming browser without leaving the terminal: it starts the relay (and leaves it up — a wizard that un-does its own work is a worse surprise), opens the site's setup page, flips to "● tab linked" the moment your browser connects, and offers to install the Claude Code hooks. The install (compiling hook claude --install) merges into ~/.claude/settings.json non-destructively: existing hooks kept, a timestamped .bak written first, the change shown before writing, and running it twice is a friendly no-op. compiling hook claude alone prints the JSON for hand-merging; compiling setup on a pipe prints the manual steps and exits 0.

npx compiling play snake

plays real games in your terminal — no browser, no setup, no dependencies. Snake and 2048 run on the exact same rules modules the site ships (arrows, WASD, or hjkl; q/Esc/Ctrl-C always restore your terminal; Ctrl-Z suspends clean and resumes paused). Recorded ambience loops here too: compiling play rain 40 fetches the site's rain bed once, caches it, and loops it at volume 40 until Ctrl-C (macOS afplay, or mpg123/ffplay on Linux; Windows audio is a fast-follow — the games already work in Windows Terminal). Bare compiling play lists what plays here.

npx compiling relay

starts a tiny relay on http://127.0.0.1:8303 (8303 for xkcd #303). Your coding agent's hooks POST an event when a run finishes or needs your input; every linked compiling.games tab gets a soft chime, the ambience ducks, and your game pauses — the site hands you back to work.

Full setup (Claude Code hook JSON, linking a tab): https://compiling.games/setup/

Protocol

  • POST /event with {"type": "done" | "waiting" | "started", "source"?: string, "detail"?: string} → broadcast to every connected tab. Fire-and-forget friendly: use curl -s -m 1 … || true in hooks so a stopped relay never slows anything.
  • GET /health{"clients": n}
  • WebSocket on the same port — this is what site tabs connect to. When several tabs are linked, the relay tags the most recently focused one; only that tab chimes, the rest just duck their ambience.

Security posture

The relay binds 127.0.0.1 only and uses no tokens, deliberately:

  • Nothing leaves the machine, and nothing off the machine can reach it.
  • Any local process can POST an event — and the worst that does is play a soft chime in your own browser. The event vocabulary carries no secrets (a type, an optional source label, an optional short detail string), so there is nothing worth protecting with a token handshake.
  • The WebSocket side checks the Origin header, so arbitrary web pages you visit can't listen to your events either.

If the vocabulary ever grows beyond "chime, please", this posture gets revisited before it ships.