Install agentreplay
Three ways to get the CLI on your machine. All produce the same binary — pick whichever fits your workflow.
Anpx — no install
$npx @sara-builds/agentreplay record BGlobal install — fastest
$npm install -g @sara-builds/agentreplay $agentreplay record CFrom source
$git clone https://github.com/sara-builds/agent-replay $cd agent-replay/cli $npm install && npm run build && npm link
Requirements
- Node 18 or newer
- The
claudeCLI on your PATH (for live capture viaagentreplay record) - For Cursor / Codex / Aider: their session logs on disk — no binary needed
First recording
From any directory you'd normally run Claude in:
$agentreplay record
Use Claude as normal. When you exit, you get a public URL that shows the
whole session as a scrubbable timeline with syntax-highlighted diffs. The
upload defaults to anonymous (7-day retention) — sign in with
agentreplay login for 365-day retention.
Privacy: every upload runs a regex secret-detector before leaving your machine (AWS / GitHub / Stripe / Anthropic / OpenAI / Slack / Google / generic env-style). In an interactive terminal you get a prompt to redact, abort, or upload as-is. $HOME → ~ rewriting is always on for path-like fields.
Importing past sessions
Already ran the agent without recording? Import the latest session retroactively:
$agentreplay capture claude
Same for cursor (parser stub for now), codex, and aider.
With no argument, agentreplay capture auto-detects the single installed agent.
Self-hosting
Override the API target:
$agentreplay record --api-base https://your-host.example.com The whole stack (CLI + Hono API + Astro renderer) is in the repo and runs on a single Hetzner CAX (€5/mo). Caddy + auto-LE for TLS, self-hosted Postgres + filesystem blobs.