GitHub - Trailblaze-work/claude-replay: TUI tool to browse and replay Claude Code sessions from ~/.claude

2 min read Original article ↗

A TUI tool to browse and replay Claude Code sessions from ~/.claude. Navigate through turns, view tool calls, toggle thinking blocks, and export recordings.

Built with Bubble Tea, Lip Gloss, and Glamour.

demo

Install

go install github.com/Trailblaze-work/claude-replay@latest

Or build from source:

git clone https://github.com/Trailblaze-work/claude-replay.git
cd claude-replay
go build -o claude-replay .

Usage

Browse (default)

Opens an interactive browser to explore all your Claude Code projects and sessions. Select a project, pick a session, and replay it.

Play a specific session

claude-replay play <session-id>       # by UUID or UUID prefix
claude-replay play <slug>             # by session slug
claude-replay play /path/to/file.jsonl # by file path

List (non-interactive)

claude-replay list                    # list all projects
claude-replay list <project-name>     # list sessions in a project

Export as recording

claude-replay export <session> -o session.cast              # asciinema .cast
claude-replay export <session> --format gif -o demo.gif     # animated GIF (requires agg)
claude-replay export <session> --format mp4 -o demo.mp4     # MP4 video (requires agg + ffmpeg)
claude-replay export <session> --mode realtime -o session.cast
claude-replay export <session> --width 120 --height 40      # custom dimensions

Play .cast files with asciinema play session.cast or upload to asciinema.org.

Output formats:

Format Requires Description
cast (default) Asciinema v2 recording
gif agg Animated GIF
mp4 agg + ffmpeg MP4 video

Timing modes:

Mode Behavior
compressed (default) Fixed 2s delay between turns
realtime Uses actual timestamps from the session
fast 2x speed of real timestamps
instant Minimal delays, shows final state of each turn

Key Bindings

Browse screens

Key Action
Enter Select project/session
/ Filter
Esc Back
q Quit

Replay screen

Key Action
←/h →/l Previous/next turn
Home/g End/G First/last turn
↑/k ↓/j Previous/next section
PgUp/Ctrl+u PgDn/Ctrl+d Page up/down
Ctrl+o Expand/collapse tool details
Space Toggle autoplay
+/- Adjust autoplay speed
? Help overlay
Esc Back to session list

Git Mode

Browse sessions stored on a claude-sessions git branch (as created by claude-session-trail):

claude-replay --git                    # browse sessions from current repo
claude-replay --git list               # list sessions non-interactively
claude-replay --git play <session-id>  # replay a session
claude-replay --git export <id> -o out.cast
claude-replay --git --git-repo /path/to/repo   # specify repo path

Flags

Flag Default Description
--claude-dir ~/.claude Path to Claude Code data directory
--git false Browse sessions from a claude-sessions git branch
--git-repo current directory Path to git repository (used with --git)

License

MIT


Trailblaze

Built by Trailblaze

We help companies deploy AI across their workforce.
Strategy, implementation, training, and governance.

hello@trailblaze.work