.tre Event Logs
Terminal Replay Events (.tre) are JSONL session logs that contain a “frozen serialization” of every ANSI byte sequence emitted during a session.
Phase 1 vs Phase 2
slides-tape splits workflow into two phases:
- Phase 1 (Execution): Executes the native Unix PTY and records bytes + millisecond timestamps to a
.trefile. - Phase 2 (Canvas Draw): Iterates over the log and pushes it through the Rust-powered canvas engine to generate MP4 frames.
⚡ Why are .tre files so powerful?
Because you can skip Phase 1 entirely once you possess a .tre log!
Imagine you are rendering a bash script that naturally clones a Git repository and runs npm install. Evaluating that script takes 5 solid minutes of real-world networking execution. If you need to adjust the Font Size or Speed, you don’t want to wait another 5 minutes.
🚀 How to optimize rendering:
To entirely bypass the physical Unix evaluation and generate a brand new video using the EXACT previously recorded session, inject the --load-events parameter:
slides-tape run deploy.sh --load-events deploy.tre --speed 3.0 --font-size 22
What previously took 5 minutes to simulate will render out into a beautifully adjusted MP4 in 2–3 seconds.
Re-render Tweaks
| Option | Effect during Re-render |
|---|---|
--speed <n> | Change playback speed multiplier. |
--font-size <px> | Scale text without pixelation. |
--font-family | Swap fonts (e.g. “Fira Code”). |
--ps1 <string> | Replace the prompt string retroactively. |