Skip to main content
The 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
required
Path to the asciicast file to replay.The file should be in asciicast v2 format (typically with .cast or .cast.txt extension).Example:

Options

flag
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:
flag
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:
flag
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

This plays back the recording with original timing.

Replay with explanation

Shows escape sequences alongside playback:

Analyze without playback

Shows the breakdown without actually playing:

Extract raw output

This dumps all the escape sequences to a file instantly.

Replay and capture

Check recording before sharing

Search for sensitive information 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
The terminal returns to normal after playback completes or is interrupted.

Understanding —explain Output

The --explain mode shows terminal actions:
Regular text output

Control Sequences

Color changes
Cursor movements
Screen clearing

Operating System Commands

Window title changes

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:
If the recording was made at 120x40 and your terminal is 80x24, replay will fail with:
Resize your terminal and try again.
Check recording dimensions:

File Format

Asciicast files are JSON-lines format: Header (line 1):
Events (subsequent lines):
Each event: [timestamp, type, data]
  • timestamp: Seconds since recording start
  • type: “o” for output, “i” for input
  • data: 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

Using agg (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

Using jq:

Loop playback

Troubleshooting

Terminal too small

Resize your terminal or use --cat to extract without replaying:

Recording doesn’t play

Check file format:
Should output 2 for asciicast v2 format.

Colors look wrong

The recording includes color theme information, but your terminal’s theme might interfere. Try: