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

tapeback

v1.0.2

Published

Like rewinding a tape 🎞️ β€” tapeback automatically records every Claude Code agent action that changes your codebase, so you can rewind to any moment in your session.

Readme

tapeback 🎞️

Like rewinding a tape β€” tapeback automatically records every Claude Code agent action that changes your codebase, so you can rewind to any moment in your session.

npm version npm downloads Buy Me A Coffee


The problem

Claude Code agents are powerful but imperfect. A single bad message can silently overwrite hours of work across multiple files β€” with no native undo beyond manual git gymnastics.

tapeback is the rewind button.

Every time Claude edits a file, tapeback automatically commits the codebase state with a [REC] tag. When something goes wrong, one command puts you back where you were.


Install

# Add to your current project
npx tapeback init

# Or install globally for all projects
npx tapeback init --global

That's it. No global install required. tapeback wires itself into Claude Code's hook system and starts recording immediately.

Uninstall

From the current project:

# Remove hook, commands, and scripts
rm -f  .claude/hooks/post-tool-use.sh
rm -f  .claude/commands/tapeback.md .claude/commands/squash.md .claude/commands/reel.md
rm -f  .claude/src/generate-headline.js .claude/src/commit-message.js \
       .claude/src/git-graph.js .claude/src/generate-reel.js

Then open .claude/settings.json and remove the PostToolUse hook entry for tapeback.

Global uninstall (~/.claude/):

rm -f  ~/.claude/hooks/post-tool-use.sh
rm -f  ~/.claude/commands/tapeback.md ~/.claude/commands/squash.md ~/.claude/commands/reel.md
rm -f  ~/.claude/src/generate-headline.js ~/.claude/src/commit-message.js \
       ~/.claude/src/git-graph.js ~/.claude/src/generate-reel.js

Then remove the hook entry from ~/.claude/settings.json.


Commands

/tapeback β€” rewind to any recording

/tapeback              # undo the last recording
/tapeback 3            # undo the last 3 recordings
/tapeback --to <hash>  # rewind to a specific commit
/tapeback --to "14:30" # rewind to nearest recording before a time

tapeback will show you exactly what will change and ask for confirmation before touching anything. If you have uncommitted work, it'll ask whether to stash or abandon it first.

/squash β€” clean history before a PR

/squash

Squashes every commit from the first [REC] to the last [REC] β€” the squash zone β€” into a single conventional commit. Manual commits inside that range are squashed in too; commits before the first [REC] or after the last [REC] are left untouched.

Shows a summary of everything in the zone, prompts for your final commit message, and creates a backup tag before touching anything.

/reel β€” interactive git graph

/reel

Renders a self-contained HTML git graph and opens it in your browser. Commits appear as coloured dots (blue = feature, green = base, red = [REC], yellow = diverge point). Hover any dot for full commit details.


How it works

tapeback uses Claude Code's PostToolUse hook to fire after every Write, Edit, or MultiEdit tool call.

Claude edits file(s)
      ↓
PostToolUse fires
      ↓
Any tracked files changed? ──No──→ exit (silent)
      ↓ Yes
git add -A
      ↓
Generate headline (claude -p with 5s timeout β†’ deterministic fallback)
      ↓
git commit  "chore(tapeback): <headline> [REC]"
      ↓
exit 0  ← always, never blocks Claude

Each recording looks like this in git log:

chore(tapeback): add JWT middleware [REC]

Agent message: "add JWT authentication to the API"
Changed files:
  src/auth/jwt.py  (+42 -3)
  tests/test_auth.py  (+18 -0)

Timestamp: 2026-02-18T14:32:07Z
Session: abc123

Configuration

tapeback reads .tapeback.json from your project root:

{
  "messageStyle": "ai",
  "aiTimeoutMs": 5000,
  "squashBaseRef": "main",
  "recTag": "[REC]",
  "ignore": ["*.env", "*.log", ".tapeback.json"],
  "sessionTag": true
}

| Option | Default | Description | |---|---|---| | messageStyle | "ai" | "ai" uses claude -p to generate a headline; "deterministic" uses filenames | | aiTimeoutMs | 5000 | Hard timeout (ms) before falling back to deterministic headline | | squashBaseRef | "main" | Branch that /squash measures divergence from | | recTag | "[REC]" | Identifier tag in every recording's commit subject | | ignore | ["*.env","*.log"] | Glob patterns to never stage or commit | | sessionTag | true | Include Claude session ID in commit body |


Requirements

  • macOS / Linux (POSIX shell required β€” Windows not supported in v1)
  • git β‰₯ 2.23
  • Node.js β‰₯ 18
  • Claude Code with hooks support

Privacy & security

tapeback is a pure git workflow layer β€” it stores no credentials, sends no data to external servers, and reads nothing from your codebase beyond what git already tracks.

  • No API keys or tokens β€” tapeback never requests, stores, or transmits any credentials
  • No network calls β€” the hook is offline; it runs entirely in your local git repo
  • No data collection β€” nothing leaves your machine except the optional claude -p headline call, which goes through your existing Claude Code session (the same one already running)
  • Open source β€” the full hook and command logic is readable in plugin/hooks/post-tool-use.sh and plugin/commands/

tapeback is a thin wrapper that adds git discipline on top of what Claude Code already does. It maximises Claude's usefulness without adding any new trust surface.


Safety guarantees

  • The hook always exits 0 β€” it can never block or crash your Claude session
  • The hook has a 5-second hard timeout on AI message generation
  • /squash always creates a backup tag before any git mutation β€” your session is always recoverable
  • /tapeback always previews what will change and asks for confirmation
  • /reel is read-only β€” it never modifies git history or files

Repository structure

tapeback/
β”œβ”€β”€ .claude-plugin                   # Plugin manifest for Claude Code registry
β”œβ”€β”€ package.json
β”œβ”€β”€ bin/
β”‚   └── tapeback.js                 # CLI entrypoint (npx tapeback init)
β”œβ”€β”€ plugin/
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   └── post-tool-use.sh        # Core auto-record hook
β”‚   β”œβ”€β”€ commands/
β”‚   β”‚   β”œβ”€β”€ tapeback.md             # /tapeback slash command
β”‚   β”‚   β”œβ”€β”€ squash.md               # /squash slash command
β”‚   β”‚   └── reel.md                 # /reel slash command
β”‚   └── settings.json               # Hook wiring for Claude Code
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ commit-message.js           # Headline generation module
β”‚   β”œβ”€β”€ generate-headline.js        # CLI wrapper for the hook
β”‚   β”œβ”€β”€ git-graph.js                # Git graph data builder
β”‚   └── generate-reel.js            # HTML graph renderer for /reel
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ hook.test.sh
β”‚   β”œβ”€β”€ tapeback.test.sh
β”‚   β”œβ”€β”€ squash.test.sh
β”‚   β”œβ”€β”€ reel.test.sh
β”‚   └── commands.test.js
└── .tapeback.json                  # Default config (copied on init)

Contributing

See CONTRIBUTING.md.


License

MIT