Prompt-level version control for AI code editing. Browse, search, diff, and rollback AI changes by intent.
npx claudepluginhub thisalihassan/promptrailPrompt-level version control for AI code editing. Browse, diff, and rollback AI agent changes by intent.
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