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

@svatah/yam-tui

v0.2.0

Published

`yam ui` — the terminal cockpit, a second renderer of the screen model (REQ-TUI-1)

Readme

@svatah/yam-tui

yam ui — the terminal cockpit, and the second renderer of the screen model (REQ-TUI-1, LLD §13.7).

$ yam ui                                  # the cockpit, on the current project
$ yam ui --screen run --run comp          # opened on one run
$ yam ui --json                           # the model's state, and nothing drawn
$ yam ui --capture 4000 > panes.txt       # draw for four seconds, then quit

Four numbered panes — tree, main, inspector, audit — with 1–4 to focus one, Tab to cycle, j/k to move, Enter to open what the cursor is on, the screen's own single-letter accelerators, and the command palette on ^K. No tmux; it runs in any terminal.

It renders the model and adds nothing

Everything a person reads here is a ScreenState from @svatah/yam-screens, loaded by the same load() the app calls. Every key runs an Action from the same registry the app's ⌘K shows, resolved by the same id. tools/repo-checks/test/palette-parity.test.ts holds the two renderers to that.

That is what --json is for: it prints the loaded screen and draws nothing, and tools/repo-checks/test/tui-pty.test.ts compares that output — key for key — with screenById("run").load(client, { runId: "comp" }) evaluated in another process. A cockpit that had massaged a number for the terminal would fail it.

Colour comes from @svatah/yam-ui-tokens's STATUS table, by the same names the browser uses: a terminal has no CSS variables, and it has the same seven tones. A status word never appears without its colour and a colour never without its word.

Opening a service

Exactly as the app does (LLD §13.6): --url/--token, or YAM_SERVICE_URL/YAM_SERVICE_TOKEN, or else yam serve --port 0 is spawned, its handshake read, and it is stopped on exit.

--capture <ms>

Draw for that long and then quit, giving the terminal back. It is the product's own flag rather than a test hook: a cockpit that can only be left by pressing a key cannot be captured by anything that is not a person, and REQ-ADE-13's point is that an agent gets what a person gets. pnpm ui:capture uses it to write reports/ui-flows.txt and reports/ui-run.txt.

Testing

  • packages/tui/test/cockpit.test.tsx — the panes, the keys and the palette, through ink-testing-library. Runs anywhere.
  • tools/repo-checks/test/tui-pty.test.ts — the cockpit inside a real pseudo-terminal (script(1), no dependency), in colour, plus the --json comparison.

Typing into a pseudo-terminal means writing to its master, and script gives a caller no way to reach one — so the keys are proven in the first file and the drawing in the second. The phase's environment note allows that split and asks that it be said.