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

runtape

v0.6.0

Published

Flight recorder for AI coding agents. Captures Claude Code sessions for replay in runtape.dev.

Readme

Runtape CLI

Flight recorder for AI coding agents. Replay every run, find every bug.

runtape is the open-source CLI for Runtape — observability and replay for AI coding agents like Claude Code.

Status

v0.3 — Adds subagent (Task tool) capture. The full internal session of every spawned agent — its user prompt, assistant turns with model + token usage, and tool calls — is now recorded as nested children of the parent Agent step.

Install

npm install -g runtape

(Requires Node.js ≥ 20.)

Get started

One command walks you through the whole setup:

runtape setup

It asks for your backend (defaults to https://runtape.dev), opens the dashboard so you can copy your API key, then installs the Claude Code hooks.

After setup, run Claude Code normally and your sessions stream to the dashboard.

runtape status       # buffer state, server reachability, flusher PID
runtape runs         # open your dashboard in the browser
runtape uninstall    # remove the hooks when you're done

If you prefer the granular commands instead of the wizard, runtape login and runtape install are still available — setup is just a convenience that chains them.

How it works

runtape install adds entries to ~/.claude/settings.json so that Claude Code fires runtape push --event <HookName> on every relevant hook event. When installed under any node_modules tree (npm-global, pnpm-workspace, etc.), the entry uses the bare command name runtape so it survives package upgrades; when run from source (e.g. tsx bin/runtape.ts during local development) it uses the absolute path from process.argv[1]. Override with the RUNTAPE_CLI_BIN env var if you need a specific path. Each invocation appends one validated JSON line to ~/.runtape/buffer/<session_id>.ndjson (sub-10ms) and lazily spawns a detached flusher daemon. The daemon batches events (up to 100 per POST) and ships them to the backend with exponential backoff on transient failures. It exits after 30s of idle.

State on disk

~/.runtape/
  config.json                  # api_key (chmod 600), server_url
  buffer/<session_id>.ndjson   # pending events
  seq/<session_id>             # monotonic sequence counter
  transcript/<session_id>      # uuids of assistant turns already emitted (v0.2+)
  flusher.pid                  # daemon PID
  flusher.log                  # daemon log (append-only)

Override the home dir with RUNTAPE_HOME (useful for tests). Override the server with RUNTAPE_API_URL or runtape login --server-url <url>.

Subpath exports

Backend services that ingest Runtape events can import the shared Zod schemas:

import { RuntapeEvent, IngestionRequest } from "runtape/types";

The schemas live in src/types.ts. The package's exports map points TypeScript at the source file (no build step required for type consumers) and Node at the compiled dist/types.js.

Changelog

0.3.0 — 2026-05-15

  • Subagent capture. On SubagentStop, the CLI now reads the subagent's agent_transcript_path and synthesizes the full internal event stream — user prompt, assistant turns (with model + usage), tool attempts and calls. Every synthesized event carries agent_tool_use_id so the server resolves it as a child of the parent Agent step. The dashboard renders these inline as nested rows under the Agent.
  • agent_tool_use_id envelope field. Optional on every event type. Server-side, when set, it overrides the open-Agent temporal heuristic and resolves the parent step directly.

0.2.1 — 2026-05-15

  • Skip <synthetic> turns. Claude Code emits placeholder assistant messages with model: "<synthetic>" (compaction markers, internal state) that always have zero usage. The transcript scanner now drops them so the dashboard doesn't show empty no-cost turns.

0.2.0 — 2026-05-15

  • Model + token usage per turn. The CLI now reads the Claude Code transcript JSONL on PostToolUse / Stop / SubagentStop and emits a new assistant_turn event for every assistant message, carrying model, input_tokens, output_tokens, cache_read_tokens, and cache_creation_tokens. The dashboard surfaces a per-turn model + cost pill and a run-level total.
  • Tool error surfacing. tool_call events now carry is_error + error_message (derived from the tool response shape — Bash exits, Edit/Write rejections, is_error content blocks, interrupts). Errored tools are visible in the run timeline without expanding the step.
  • State. Adds ~/.runtape/transcript/<session_id> to track which assistant message uuids have already been emitted (idempotent scans across hook fires).

To upgrade:

npm install -g runtape@latest
runtape install   # safe to re-run; refreshes the hook entries

No changes to the existing hook commands or config file format.

0.1.x

Initial MVP. Hook-based capture of Claude Code sessions (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStop), buffered to disk and flushed by a detached daemon.

Open source

MIT licensed. Audit exactly what's captured. The Runtape backend (dashboard, ingestion API) is closed-source SaaS at runtape.dev.

Repos

  • This repo (runtape) — the open-source CLI
  • runtape-mcp — MCP server for Runtape (planned)

License

MIT