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

@getpipher/term

v0.4.1

Published

Programmatic tmux driver for the pi coding agent — spawn/drive a tmux session (send-keys, capture-pane, wait-for-pattern/quiet, resize, kill) for autonomous TUI QA. tmux-only; ships as an importable lib + a thin pi extension.

Readme

@getpipher/term

Status: v0.4.0 (shipped — spawn auto-detects window-in-current-session vs detached-session; default no-kill for post-run inspection). See docs/superpowers/specs/2026-07-22-term-design.md.

A focused programmatic tmux driver for the pi coding agent — spawn/drive a tmux session (type text, send named keys, capture pane content, wait for a render pattern or render-quiet, resize, kill) for autonomous TUI QA. tmux-only; ships as an importable lib/ + a thin pi extension that exposes a model-callable term tool.

Why

The ad-hoc tmux-driving harness used across @getpipher/armory-todo and @getpipher/vision QA (send-keys, capture-pane, restart-between-scenarios) was the seed. @getpipher/term generalizes it into a reusable, tested package so the agent can run the same autonomous verification inside any pi session.

Surfaces

  • lib/ — importable async function API (spawn, attach, sendKeys, sendKey, capture, waitFor, waitForQuiet, resize, kill). Use from standalone TS QA scripts via tsx.
  • extensions/term.ts — pi extension wrapping the lib as a single term tool with a 9-action enum (agent-primary).

spawn auto-detection + no-kill default (v0.4.0)

spawn now branches on $TMUX:

  • pi inside tmux → creates a new detached window in the current session (mode: "window"). Detached (-d) so your active window keeps focus; reach the QA window via prefix + <n>. The window name gets a rand suffix (pi-term-<rand>) for uniqueness within the shared session.
  • pi outside tmux (e.g. plain Ghostty) → creates a new detached session (mode: "session"), the v0.1 fallback.

kill tears down only what spawn created — kill-window for window-mode (your session stays), kill-session for session-mode. Never-kill-attached no-op on panes we didn't spawn is preserved.

Default agent behavior: do NOT call kill at the end of a run — leave the window/session so you can inspect the final TUI state. The lease reaper cleans up idle ones (30 min session-mode, 2 h window-mode). The tool result includes windowName/session/window so the agent can report how to switch to it.

keys vs sendKey (v0.2.0)

sendKeys(pane, keys) types literal text — it sends exactly what you give it via tmux send-keys -l, with no escape interpretation. To press a special key (Enter, Esc, Tab, arrows, C-c, …) use sendKey(pane, key) — the "second button." This decouples text from control keys: the v0.1.0 parseKeys tokenizer was removed because its textual-escape handling (an agent sending /todo\r as the two letters \r) didn't match the raw-byte mapping the impl actually did. keys is now unambiguous.

Install (pi)

Add to ~/.pi/agent/settings.json packages:

"npm:@getpipher/term"

Then /reload or restart pi.

Quick example (standalone)

import * as term from "@getpipher/term/lib/tmux.ts";

const { pane, mode, windowName, session } = await term.spawn({ command: "pi", width: 120, height: 40 });
await term.sendKeys(pane, "/todo");
await term.sendKey(pane, "Enter");
const capture = await term.waitFor(pane, /Active/, { timeout: 10000, quietMs: 300 });
console.log(capture.text);
// v0.4.0 default: do NOT kill — leave the window/session for inspection.
// The lease reaper cleans up idle ones (30 min session, 2 h window).
// To switch to it: window-mode → `prefix + <n>`; session-mode → `tmux switch-client -t <session>`.
// Explicit cleanup when you're done inspecting:
// await term.kill(pane);

Status & roadmap

  • v0.4.0spawn auto-detects: new window in current session (pi inside tmux) vs new detached session (pi outside tmux). kill branches to kill-window/kill-session. Default no-kill for post-run inspection; window lease 2 h, session lease 30 min.
  • v0.3.0{ throws: false } opt-out: waitFor/waitForQuiet return a WaitForResult union ({ ok: true, result } | { ok: false, error }) instead of throwing on timeout. Default throws: true is unchanged. Lib API only.
  • v0.2.0keys is pure literal; sendKey for special keys. (Breaking change from v0.1.0's embedded-escape keys.)
  • v0.1.0 — tmux-only, async function API, 9-action tool, structured capture, pattern+quiet waitFor, lease lifecycle.
  • v0.3+ (planned, grounded in usage) — declarative run(steps) DSL, TerminalDriver interface (when a 2nd backend is real), composite sendAndCapture if usage justifies.

License

MIT © RECTOR