cast
console2svg cast <cast> [options]cast is a subcommand that loads an asciicast v2 format file (<cast>) generated by terminal recording tools (such as asciinema) or console2svg itself, replays it as a terminal screen, and converts it into vector graphics (SVG) or video.
Without spawning new child processes, it renders still images, animated SVGs, PNGs, MP4s, and more with high fidelity directly from existing recording data.
Command Behavior
Section titled “Command Behavior”Pours the terminal output events and timing data from the specified asciicast file into a terminal emulator to reconstruct the screen state.
When you specify -v, it generates an animated SVG or video containing the chronological progression of all events; without -v, it outputs the final settled screen as a single still image.
Options
Section titled “Options”cast supports the same rendering configuration options as capture, excluding options related to spawning new commands (such as command line specification and environment variable stripping).
Output and Formats
Section titled “Output and Formats”-o, --out <path>: Specifies the output file path (format is automatically inferred from file extension).--format <format>: Explicitly specifies the output format (svg,png,gif,mp4, etc.).-v, --video: Outputs as an animated SVG or video format.--stdout: Writes the generated SVG directly to standard output.
Terminal Size and Screen Cropping
Section titled “Terminal Size and Screen Cropping”-w, --width <int|adjust>,-h, --height <int|adjust>: Specifies terminal width (in columns) and height (in rows). Settingadjustfits the dimension to the content.--size <WxH>: Specifies pixel dimensions of the output image.--crop-top,--crop-bottom,--crop-left,--crop-right: Crops the top, bottom, left, or right edges of the screen in pixels (px) or characters (ch).
Appearance and Themes
Section titled “Appearance and Themes”-d, --window [style]: Specifies window decoration style (macos,macos-pc,windows, etc.).-t, --theme <id>: Specifies appearance theme ID.--forecolor <color>,--backcolor <color>: Overrides foreground or background color.--background <value>: Specifies window background color or image file.--opacity <number>: Specifies terminal background opacity (0.0–1.0).--font <family>,--fontsize <px>: Specifies font family and font size.-c, --with-command: Displays a command header at the top of the screen.
Playback and Animation Control
Section titled “Playback and Animation Control”--frame <index>: Extracts the specified frame index as a still image.--time <sec>: Extracts a specific timestamp or aSTART-ENDrange as a still image or animation.--fps <number>: Specifies maximum sampling rate.--no-loop: Disables looping playback in animated SVGs.--sleep <sec>: Specifies the duration in seconds to hold the final frame after playback completes.--fadeout <sec>: Specifies the fadeout duration in seconds at the end of the video.--save-frames <dir>: Saves sequential still SVG frames to the specified directory.
Masking and Diagnostics
Section titled “Masking and Diagnostics”--mask <pattern>: Masks the specified string pattern.--mask-auto [bool]: Enables or disables automatic secret masking via QuickLeaks.--svg-converter <converter>: Specifies the rasterization engine (auto,resvg,ffmpeg,rsvg-convert).--verbose [path]: Specifies the destination for verbose log output.