Run Command

Record a shell script to MP4/WebM using the high-performance native canvas renderer.

slides-tape run demo.sh -o demo.mp4 --speed 1.5 --font-size 18
OptionDescriptionDefault
-o, --output <path>Output file path<script>.mp4
-r, --resolution <WxH>Video resolution1920x1080
-f, --fps <fps>Framerate30
--fastFast preview modefalse
--format <fmt>mp4 | webmmp4
--speed <n>Playback speed multiplier1
--cols / --rows <n>Terminal dimensions120x30
--ps1 <prompt>Shell prompt string"$ "
--font-size <px>Font size (Canvas only)14
--font-family <name>Font family (Canvas only)"JetBrains Mono"
--load-events <path>Render from a .tre file-
--skip-idle <ms>Collapse idle gaps > ms-
--highlight-cmdsVisual flash on command start-
--no-save-eventsDisable auto-saving .tre-
--keep-framesKeep raw PNG files-

๐Ÿ—๏ธ Deterministic Runner

Starting with v2.1.0, the run command uses a two-phase execution loop:

  1. The Capture Phase: Your script runs in a native Unix PTY while the engine records raw ANSI sequence timestamps into a .tre file.
  2. The Render Phase: The .tre file is pushed through the @napi-rs/canvas engine to compile frames at a perfect, constant framerate, regardless of system load during execution.

๐Ÿ’ป Terminal Directives

You can embed special automation directives inside your bash run scripts to control execution, simulate typing, and wait for conditions.

DirectiveDescription
# @type "cmd"Simulates human typing.
# @wait <time>Pause (e.g., 2s, 500ms, or auto).
# @await port <n>Polls until TCP port is open (max 30s).
# @await file <path>Polls until file exists (max 30s).
# @await http <url>Polls until HTTP 200 (max 30s).
# @hide / # @showRun commands invisibly in the background.
# @echo off / # @echo onExecute visibly, but donโ€™t show the typing phase.
# @clearClear terminal screen.
# @title "label"Change the macOS-style terminal title bar.
# @print "text"Inject raw text/ANSI directly into stream.
# @ps1 "prompt"Change shell prompt on-the-fly (supports ANSI).