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

backstory

v0.1.0

Published

Capture the AI prompts behind your code changes and attach them to git commits as git notes.

Readme

backstory

Git history tells you what changed. When the change came from an AI coding agent, the why lives in a prompt that gets thrown away. backstory captures those prompts and attaches them to your commits as git notes (refs/notes/backstory), so the context travels with the repo without touching the commits themselves.

Works with Claude Code, Cursor, OpenAI Codex CLI and Google Antigravity. Everything stays on your machine.

Install

npm install -g backstory

Requires Node 18+. The Cursor adapter additionally needs better-sqlite3 (installed automatically as an optional dependency; if its build fails, only the Cursor adapter is disabled).

Setup, once per repo

cd your-repo
backstory install-hooks
backstory watch

install-hooks writes a post-commit hook that moves any captured prompts into a git note on the new commit. It never blocks or fails a commit.

watch detects which agents have data for this repo and starts recording in the background. backstory stop ends it, backstory status shows what is pending.

To make notes follow git push / git pull automatically:

backstory install-hooks --configure-push

Or push them by hand: git push origin refs/notes/backstory.

How capture works per agent

| agent | mechanism | | --- | --- | | Claude Code | official Stop hook, registered in .claude/settings.local.json | | Codex CLI | tails the session transcripts under ~/.codex/sessions/ | | Antigravity | tails conversation logs under ~/.gemini/antigravity-ide/brain/ (and legacy ~/.gemini/antigravity/brain/) | | Cursor | polls Cursor's internal sqlite database (undocumented format, may break on Cursor updates; degrades silently) |

For anything else, record by hand:

backstory note -p "make the retry logic exponential" -r "rewrote backoff in client.js" -f "src/client.js" --agent chatgpt

Reading the history back

backstory why src/client.js 42     # who wrote this line, and what was the prompt
backstory log src/client.js       # full history of a file with AI context inline
backstory show HEAD               # raw note JSON for one commit
backstory export --out notes.json # everything as JSON
backstory dashboard               # local web UI on http://localhost:4287

The dashboard has full-text search across prompts, a per-file timeline, a breakdown by agent and a list of the most AI-touched files. It is served locally from the export data and needs no build step.

Notes on the data

Entries are stored in a common shape regardless of agent:

{
  "agent": "claude-code",
  "prompt": "the user's instruction",
  "response_summary": "short summary of what the AI did",
  "files": ["src/client.js"],
  "timestamp": "2026-07-17T09:30:00.000Z",
  "session_id": "abc123"
}

Between commits, entries queue up in .git/backstory/pending.json. On commit they become one note on that commit. Notes are additive: nothing in your existing history is modified, and deleting the refs/notes/backstory ref removes everything backstory ever wrote.