replay command plays back terminal session recordings created with wezterm record or other asciicast-compatible tools.
Synopsis
Description
Replays an asciicast file in your terminal with proper timing, allowing you to review recorded terminal sessions. The replay preserves all formatting, colors, and timing information from the original recording. Supports the asciicast v2 format.Arguments
Path to the asciicast file to replay.The file should be in asciicast v2 format (typically with
.cast or .cast.txt extension).Example:Options
Explain what is being sent/received.Shows a detailed breakdown of the escape sequences and control codes in the recording, alongside the normal playback. Useful for understanding terminal behavior and debugging.Example:
Don’t replay, just show the explanation.Analyzes the recording and displays all escape sequences and control codes without actually playing it back in the terminal. This is useful for detailed analysis of terminal output.Conflicts with:
--explainExample:Just emit raw escape sequences all at once, with no timing information.Outputs all the terminal escape sequences from the recording immediately, without pausing for timing. This is useful for quickly extracting the final state or piping to other tools.Conflicts with:
--explainExample:Examples
Basic replay
Replay with explanation
Analyze without playback
Extract raw output
Replay and capture
Check recording before sharing
Playback Controls
During normal replay (without--cat), you can:
- Watch: The recording plays with original timing
- Wait: Playback completes automatically
- Interrupt: Press Ctrl-C to stop playback
Understanding —explain Output
The--explain mode shows terminal actions:
Print Actions
Control Sequences
Operating System Commands
Use Cases
Reviewing Recordings
Before sharing a recording:Debugging Terminal Output
Understand what escape sequences are being used:Extracting Final State
Get the final output without waiting:Learning Terminal Escapes
Study how programs use terminal features:Quality Checking
Check recordings before uploading:Converting to Text
Extract plain text (with escape codes):Terminal Size Requirements
When replaying, your terminal must be at least as large as the recording: Check recording dimensions:File Format
Asciicast files are JSON-lines format: Header (line 1):[timestamp, type, data]
timestamp: Seconds since recording starttype: “o” for output, “i” for inputdata: The actual terminal data
Comparing Recordings
Extract and diff outputs
Compare timing
Performance
Replay performance is generally excellent:- With timing: Plays at recorded speed
- With —cat: Instant output
- With —explain: Slight overhead for parsing
- With —explain-only: Fast, no terminal rendering
Integration with Other Tools
Convert to GIF
Usingagg (asciicast to GIF):
Upload to asciinema.org
Embed in documentation
Use asciinema-player in HTML:Extract to text
Remove escape sequences:Tips
Speed up review
Use--cat to see everything instantly:
Search for content
Extract specific timing
Usingjq:
Loop playback
Troubleshooting
Terminal too small
Resize your terminal or use--cat to extract without replaying:
Recording doesn’t play
Check file format:2 for asciicast v2 format.
Colors look wrong
The recording includes color theme information, but your terminal’s theme might interfere. Try:Related
- wezterm record - Record terminal sessions
- wezterm start - Start a terminal session
- Asciicast v2 Format
- asciinema.org - Share recordings online