Convert AI coding agent sessions (Claude Code, Cursor, Codex, Gemini, OpenCode, Kimi Code) into self-contained, embeddable HTML replays
Convert AI coding agent sessions (Claude Code, Cursor, Codex, Gemini, OpenCode, Kimi Code) into self-contained, embeddable HTML replays
Community tool — not affiliated with or endorsed by Anthropic.
AI coding sessions are great for development, but hard to share. Screen recordings are bulky and transcripts are hard to navigate.
claude-replay turns Claude Code, Cursor, Codex CLI, Gemini CLI, OpenCode, Kimi Code, and Hermes Agent session logs into interactive, shareable HTML replays. The generated replay is a single self-contained HTML file with no external dependencies — you can email it, host it anywhere, or embed it in documentation. Use --serve --watch to monitor agent sessions live as they run.
Claude Code, Cursor, Codex CLI, Gemini CLI, OpenCode, Kimi Code, and Hermes Agent store conversation transcripts on disk. claude-replay auto-detects the format and converts them into visual replays suitable for blog posts, demos, and documentation.
| Source | Transcript location |
|---|---|
| Claude Code | ~/.claude/projects// |
| Cursor | ~/.cursor/projects//agent-transcripts// |
| Codex CLI | ~/.codex/sessions// |
| Gemini CLI | ~/.gemini/tmp//chats/ |
| OpenCode | Export via opencode export |
| Kimi Code | ~/.kimi-code/sessions///agents//wire.jsonl |
| Hermes Agent | ~/.hermes/state.db (read live via SQLite) or hermes sessions export |
--serve --watch)claude-replay is useful for:
npm install -g claude-replayOr run directly with npx (zero install):
npx claude-replaydocker run --rm --init -p 7331:7331 \
-v ~/.claude/projects:/root/.claude/projects:ro \
ghcr.io/es617/claude-replayOpen http://localhost:7331 for the web editor. Session directories are mounted read-only.
For CLI usage:
docker run --rm --init \
-v ~/.claude/projects:/root/.claude/projects:ro \
-v $(pwd):/output \
ghcr.io/es617/claude-replay \
/root/.claude/projects/my-project/session.jsonl -o /output/replay.html# Launch the web editor (default)
claude-replay
# Generate a replay by session ID (auto-finds the file)
claude-replay abc123def456 -o replay.html
# Or pass the full path
claude-replay ~/.claude/projects/-Users-me-myproject/session-id.jsonl -o replay.html
# Chain multiple sessions into one replay
claude-replay session1-id session2-id -o combined.htmlRunning claude-replay with no arguments opens a browser-based editor that auto-discovers your Claude Code and Cursor sessions. From there you can browse, edit, preview, and export replays visually.
For CLI usage, you can pass just a session ID — claude-replay will search ~/.claude/projects/, ~/.cursor/projects/, ~/.codex/sessions/, ~/.gemini/tmp/, and the Hermes SQLite databases (~/.hermes/) to find the matching file. Or pass the full path to a session file directly.
Cursor transcripts are also supported — the format is auto-detected. Cursor transcripts don't include timestamps, so playback uses paced timing by default (see Timing modes).
claude-replay ~/.cursor/projects/*/agent-transcripts//.jsonl -o replay.htmlCodex CLI (OpenAI) transcripts are also supported — the format is auto-detected. Codex tool calls (exec_command, apply_patch) are mapped to their Claude Code equivalents (Bash, Edit/Write) so they render with the same diff views and command previews.
claude-replay ~/.codex/sessions/2026/03/12/rollout-.jsonl -o replay.htmlGemini CLI transcripts are also supported — the format is auto-detected. Gemini stores sessions as single JSON files (not JSONL) with inline thinking blocks and tool calls. Tool names are mapped to their Claude Code equivalents (run_shell_command → Bash, read_file → Read, etc.) for consistent rendering.
claude-replay ~/.gemini/tmp//chats/session-.json -o replay.htmlYou can also search by session ID:
claude-replay -o replay.html # searches ~/.gemini/tmp/ automaticallyOpenCode transcripts are supported — the format is auto-detected. OpenCode stores sessions in a SQLite database, so you'll need to export the session first using the OpenCode CLI. Thinking/reasoning blocks are rendered natively.
# Export a session from OpenCode, then replay it
opencode export > session.jsonl
claude-replay session.jsonl -o replay.htmlKimi Code (Moonshot AI) transcripts are supported — the format is auto-detected. Kimi Code stores sessions as wire.jsonl under ~/.kimi-code/sessions/, with each subagent in its own agents// directory; the web editor discovers the main session alongside any subagents. Thinking blocks and tool calls are rendered natively.
Hermes Agent (Nous Research) sessions are supported two ways. On Node 22.5+, claude-replay reads the live SQLite store directly — no export needed:
# By session ID (searches ~/.hermes/state.db and ~/.hermes/profiles/*/state.db)
claude-replay 20260819_142844_43efe7 -o replay.html
# Or by virtual path
claude-replay ~/.hermes/state.db#session: -o replay.htmlExported files also work: hermes sessions export --session-id --format jsonl out.jsonl, then replay out.jsonl (auto-detected). Tool names (terminal, patch, read_file, etc.) are mapped to Claude Code equivalents for consistent rendering; reasoning blocks are shown as thinking. The web editor lists Hermes sessions grouped by profile.
The default experience. Launch it by running claude-replay with no arguments:
claude-replay
claude-replay --port 8080The editor provides:
~/.claude/projects/, ~/.cursor/projects/, ~/.codex/sessions/, ~/.gemini/tmp/, and the Hermes SQLite databases (~/.hermes/), plus a folder navigator for session files stored elsewhereThe editor runs a local server on 127.0.0.1 (localhost only, not exposed to the network). It never modifies your original JSONL files — all edits are held in memory and only affect the exported output.
claude-replay [--port N] Launch the web editor (default)
claude-replay [input2...] [options] Generate replay from CLI
claude-replay extract [-o output.jsonl] [--format jsonl|json]Each `` can be a session file path or a session ID. If it is not an existing file path, it is treated as a session ID. claude-replay searches ~/.claude/projects/, ~/.cursor/projects/, ~/.codex/sessions/, ~/.gemini/tmp/, and the Hermes SQLite databases (~/.hermes/) for a matching session file. You can find your current session ID in Claude Code by running /status.
Multiple inputs are concatenated into a single replay (up to 20). When all sessions have timestamps, turns are sorted chronologically; otherwise command-line order is used. This is useful when accepting a plan creates a new session — chain the sessions to get the full story in one replay.
editor [file|session-id]Launches the web-based replay editor. Optionally pass a file path or session ID to auto-load it on startup. See Web Editor above.
claude-replay editor # empty editor
claude-replay editor ~/.claude/projects/.../session.jsonl # auto-load file
claude-replay editor abc123 # auto-load by session IDextractExtract the embedded turn data from a previously generated replay HTML file. Outputs JSONL by default (one turn per line, bookmarks embedded). Use --format json for the legacy JSON format.
claude-replay extract replay.html -o session.jsonl # JSONL (default)
claude-replay extract replay.html -o data.json --format json # JSON
# Round-trip: extract, then regenerate with different options
claude-replay extract replay.html -o session.jsonl
claude-replay session.jsonl -o new-replay.html --theme draculaThe extracted JSONL can be fed back into claude-replay to regenerate with different options. Bookmarks are preserved as a bookmark field on each turn.
| Flag | Description |
|---|---|
-o, --output FILE |
Output HTML file (default: stdout) |
--turns N-M |
Only include turns N through M |
--exclude-turns N,N,... |
Exclude specific turns by index |
--from TIMESTAMP |
Start time filter (ISO 8601) |
--to TIMESTAMP |
End time filter (ISO 8601) |
--speed N |
Initial playback speed, e.g. 2.0 (default: 1.0) |
--no-thinking |
Hide thinking blocks by default |
--no-tool-calls |
Hide tool call blocks by default |
--font-size SIZE |
Font size: small, normal, large (default: normal) |
--mark "N:Label" |
Add a bookmark/chapter at turn N (repeatable) |
--bookmarks FILE |
JSON file with bookmarks [{turn, label}] |
--no-auto-redact |
Disable automatic secret redaction |
--redact "text" |
Replace all occurrences of text with [REDACTED] (repeatable) |
--redact "text=repl" |
Replace all occurrences of text with custom replacement (repeatable) |
--title TEXT |
Page title (default: derived from input path) |
--description TEXT |
Meta description for link previews (default: Interactive AI session replay) |
--og-image URL |
OG image URL for link previews (default: hosted default). A default image is always included; to use your own, host it and pass the URL. |
--user-label NAME |
Label for user messages (default: User) |
--assistant-label NAME |
Label for assistant messages (default: auto-detected) |
--timing MODE |
Timestamp mode: auto, real, paced (default: auto) |
--pacing MODE |
paced reveal mode: sections or paced-wording (default: sections); requires --timing paced |
--reading-wpm N |
Base paced-wording rate from 80–600 WPM (default: 238); requires --pacing paced-wording |
--theme NAME |
Built-in theme (default: tokyo-night) |
--theme-file FILE |
Custom theme JSON file (overrides --theme) |
--no-minify |
Use unminified template (default: minified if available) |
--no-compress |
Embed raw JSON instead of compressed data (for older browsers) |
--open |
Open the generated HTML in the default browser |
--serve |
Serve the replay on a local HTTP server instead of writing to file |
--watch |
Watch input files for changes and auto-regenerate |
--list-themes |
List available built-in themes and exit |
--port N |
Port for the editor/serve server (default: 7331 editor, 7332 serve) |
…Th
No open issues yet, or sync has not completed.