@sara-builds/agentreplay
v0.1.0
Published
Record your Claude Code / Cursor / Codex / Aider sessions and share them as scrubbable URLs. One CLI command, public link out.
Maintainers
Readme
@sara-builds/agentreplay
Record your Claude Code / Cursor / Codex / Aider sessions and share them as scrubbable, embeddable URLs. One CLI command. Public link out.
npx @sara-builds/agentreplay recordThat's it. The wrapper installs a hook into Claude Code, you use Claude normally, and when you exit you get a public playback URL.
[agentreplay] capturing — session a3f9b2c1 on port 51234
[agentreplay] starting claude...
(your Claude Code session — runs as normal)
[agentreplay] captured 17 events (12,840 bytes)
✓ Recording: https://agentreplay.sh/r/a7Bk2pQ
Retention: 7 days (anonymous — sign in with `agentreplay login` for longer retention)Why
Screen recordings of agent sessions are noisy, untrimmable, and 50MB+. AgentReplay captures the structured event stream the agent itself emits — every prompt, tool call, file diff — and renders it as a polished timeline you can scrub, embed, and search.
Install
npx @sara-builds/agentreplay record # one-shot, no install
npm install -g @sara-builds/agentreplay # global, then `agentreplay` is on your PATHRequires Node 18+ and the claude CLI on your PATH (for live capture). For Cursor / Codex / Aider you don't need their binaries on PATH — the importer reads their on-disk session logs.
Commands
agentreplay record # live-capture the next Claude Code session in this dir
agentreplay record -- -p "<prompt>" # headless: pass args to claude after `--`
agentreplay record --no-upload # save locally without uploading
agentreplay capture # auto-detect the installed agent, import latest session
agentreplay capture claude # most recent Claude Code session from disk
agentreplay capture claude --last 3 # last 3 user-prompt turns
agentreplay capture claude --all # full session
agentreplay capture cursor # Cursor (parser is currently a stub — see issues)
agentreplay capture codex # most recent ~/.codex/sessions/*.jsonl
agentreplay capture aider # .aider.chat.history.md in cwd
agentreplay login # sign in via GitHub device-code flow
agentreplay logout
agentreplay whoamiPrivacy
- Anonymous uploads are public, 7-day retention. Sign in for 365-day retention (Pro).
- Every upload runs a regex-based secret detector first (AWS / GitHub / Stripe / Anthropic / OpenAI / Slack / Google / generic env-style). In an interactive terminal you get a
[a]bort / [r]edact (default) / [u]ploadprompt; in headless mode (-p) we auto-redact. $HOME → ~is rewritten incwdand any*_pathfield, always-on.- See SECRETS.md for the pattern set + how to add your own.
Self-host
Override the API target if you're running your own AgentReplay server:
agentreplay record --api-base https://your-host.example.com
# or
export AGENTREPLAY_API=https://your-host.example.comSource + issues
github.com/sara-builds/agent-replay — MIT.
The whole stack (CLI + API + renderer) is open source and self-hostable. The hosted service at agentreplay.sh runs the same code.
