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

promptrail

v0.6.8

Published

See what every AI prompt changed. Reads Claude Code and Cursor sessions automatically. Browse, diff, and rollback by intent.

Readme

Promptrail

git blame, but for AI coding agents.

See which prompt changed which files. View diffs and rollback by intent. Works with Cursor and Claude Code.

npx promptrail timeline

The Problem

You ask an AI agent to refactor a function. It edits 4 files. You ask it to add error handling. It edits 6 more. After a few rounds you have no idea:

  • Which prompt caused which changes
  • Why the agent touched a seemingly unrelated file
  • How to undo just one specific instruction without losing everything after it

Cursor checkpoints help but only show a flat list. Git commits are too coarse. Neither tracks the intent behind each change.

How It Works

Promptrail reads your AI sessions automatically — no manual tagging, no configuration. It builds a timeline where each entry is a prompt with its associated file changes.

Supported Agents

| Agent | Diff Quality | |-------|--------------| | Cursor | Edit-level hunks via hooks (auto-installed) | | Claude Code | Edit-level hunks |

What You Can Do

  • Browse: See every prompt in the sidebar timeline, grouped by source (Cursor / Claude)
  • Trace: See exactly which files changed for each prompt, with model and mode badges
  • Diff: View before/after diffs for any prompt's changes
  • View Response: Read the AI's full response for any prompt (text replies + tool calls)
  • Cherry Revert: Undo a specific prompt's changes without losing unrelated work
  • Export: Export any conversation to markdown
  • Search: Full-text search across prompts and AI responses (FTS5), or filter by file name
  • Filter: Toggle to show only prompts that changed files

Extension Commands

| Command | Description | |---------|-------------| | Promptrail: Refresh Timeline | Refresh the sidebar timeline | | Promptrail: View Task Diff | Open before/after diffs for a prompt's changes | | Promptrail: View AI Response | View the AI's response for a prompt (text + tool calls) | | Promptrail: Rollback to Task | Cherry revert a prompt's changes using exact edit reversal | | Promptrail: Export Chat to Markdown | Export a conversation as .md |

Installation

CLI

npm install -g promptrail

Or run directly without installing:

npx promptrail timeline

Cursor Extension

Install from Open VSX:

cursor --install-extension thisalihassan.promptrail

From Source (CLI + Extension)

git clone https://github.com/thisalihassan/promptrail
cd promptrail
npm install
npm run build

Install the CLI globally from the local build:

npm link
# Now you can run: promptrail timeline

Or run it directly without linking:

node dist/cli.js timeline

To install the extension locally:

npm run package
cursor --install-extension promptrail-*.vsix

Claude Code Plugin

Promptrail includes a Claude Code plugin that adds skills for timeline, diff, search, response, and rollback. Install from inside Claude Code:

/plugin marketplace add thisalihassan/promptrail
/plugin install promptrail@promptrail

Once installed, Claude Code sessions are automatically tracked via hooks. The timeline, diffs, search, and rollback all work through the CLI. See claude-plugin/README.md for full usage.

For Development

Open the repo in Cursor and press F5 to launch the Extension Development Host.

CLI Usage

Run from your project root:

promptrail timeline              # List all prompts with file counts and model badges
promptrail timeline --files      # Include file lists per prompt
promptrail timeline -n 10        # Show only the last 10 prompts
promptrail diff 3                # Show diff for prompt #3
promptrail diff "refactor auth"  # Diff for prompt matching text
promptrail response 3            # Show AI response for prompt #3
promptrail search "shadow DB"    # Search prompts and responses (FTS5)
promptrail search "auth.ts"      # Search by file name
promptrail rollback 5            # Cherry revert prompt #5 (preserves later edits)
promptrail --version             # Print version
promptrail sessions              # List all sessions
promptrail migrate ../old-project  # Copy sessions from another workspace

Filters

promptrail timeline -s claude    # Only Claude Code prompts
promptrail timeline -s cursor    # Only Cursor prompts
promptrail timeline -m sonnet    # Only prompts using sonnet models

Shortcuts: tl for timeline, d for diff, r for response, rb for rollback, s for sessions, mg for migrate. Search has no shortcut to avoid collision with sessions.

Session Migration

AI agents often edit files across workspace boundaries. You're working on a backend repo and Cursor starts editing the frontend, or Claude Code touches a shared library in a different project. The chats live in the wrong workspace — you can't see the timeline, diffs, or rollback where the changes actually happened.

migrate copies all session history from one workspace to another so you can track everything from the right place.

cd /path/to/frontend
promptrail migrate /path/to/backend

What gets copied:

  • Cursor chats — transcripts and sidebar entries, so imported chats show up in Cursor's chat panel
  • Cursor metadata — timestamps, file attribution, checkpoints, code blocks
  • Claude Code sessions — session files including subagent and tool-result data

All embedded workspace paths are automatically rewritten from source to target. The source workspace is never modified — everything is copied, not moved.

Known Limitations

  • Cursor rollback requires hooks — hooks are auto-installed on first use (promptrail init). Sessions that ran before hooks were installed have no edit data for rollback.
  • Cherry Revert may conflict if a later prompt modified the same lines or strings. Conflicts are reported per-file so you know what couldn't be reverted.

Platform Support

| Platform | Status | |----------|--------| | macOS | Fully supported | | Linux | Supported | | Windows | Supported |

License

Promptrail is licensed under the Business Source License 1.1 (BUSL-1.1).

The Additional Use Grant allows personal use and internal business use, including internal production use within your own organization. A separate commercial license is required to sell Promptrail, offer it to third parties as a hosted or managed service, bundle or embed it in a product or service offered to third parties, white-label it, or otherwise commercialize it beyond internal use.