Prompt-level version control for AI code editing. Browse, diff, and rollback AI agent changes by intent.
Architecture guide for the Promptrail CLI. Use when the user asks about how Promptrail works, its data model, CLI commands, or wants to understand the tool before making changes.
Show the diff (file changes) for a specific AI prompt. Use when the user asks what a prompt changed, wants to see a diff, or asks about changes from a specific prompt number or text.
View the AI's full response for a specific prompt. Use when the user wants to see what the AI replied, review a previous answer, or check tool calls from a specific prompt.
Rollback (undo) the file changes from a specific AI prompt. Use when the user wants to undo, revert, or rollback changes from a specific prompt. IMPORTANT - this is destructive, always confirm with the user first.
Search across all AI prompts and responses using full-text search. Use when the user wants to find a previous conversation, check if they already asked something, or search for a specific topic across sessions.
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
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
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:
Cursor checkpoints help but only show a flat list. Git commits are too coarse. Neither tracks the intent behind each change.
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.
| Agent | Diff Quality |
|---|---|
| Cursor | Edit-level hunks via hooks (auto-installed) |
| Claude Code | Edit-level hunks |
| 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 |
npm install -g promptrail
Or run directly without installing:
npx promptrail timeline
Install from Open VSX:
cursor --install-extension thisalihassan.promptrail
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
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.
Open the repo in Cursor and press F5 to launch the Extension Development Host.
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
npx claudepluginhub thisalihassan/promptrail --plugin promptrailCapture AI coding sessions to understand intent
Session transcript timeline viewer for Claude Code and Codex agent sessions
Mine your SpecStory coding histories (Claude Code, Codex, Cursor, Gemini, and more) into a persistent corpus, surface your reproducible workflows with corroborated evidence and outcome labels, and forge the ones you choose into skills installed across every agent harness.
OpenLTM — Long-Term Memory for AI coding agents: semantic search, context injection, session learning
Git-versioned, taxonomy-structured memory for Claude Code — recall by path, branch to isolate, time-travel to audit.
ax - the agent experience layer. Local graph of every Claude Code + Codex session, skill invocation, edit, and commit. Surfaces what to use, what to ground on, and which experiments to package next.