๐ŸŽฌ

yr

Terminal recordings that just work on Windows

Terminal recording toolkit for creating GIF and WebP demos from scripted scenarios. Windows-first, PTY-based, with secret masking and output synchronization.

What is yr?

yr (Yemelianov Recorder) is a CLI tool for creating terminal recordings from scripted scenarios. Write a .yr script describing what to type, and yr renders it into a GIF or WebP โ€” no screen recording software needed.

yr showcase

Built in Rust with ConPTY on Windows (and portable-pty on other platforms), yr gives you pixel-perfect terminal output with full ANSI color support.

Why yr?

The Problem: Existing tools like VHS and asciinema are Linux-first. ConPTY on Windows has quirks that cause garbled output, dropped frames, and broken recordings. Creating terminal demos for documentation shouldnโ€™t require a Linux VM.

The Solution: yr is built Windows-first with ConPTY handling baked into its architecture. It also introduces directives that existing tools lack: instant paste, secret masking, output-driven synchronization, and chapter markers.

How it compares

FeatureyrVHSasciinema
Windows ConPTYNativePartialNo
Secret maskingBuilt-inNoNo
Output sync (WaitFor)Built-inNoNo
Instant pasteBuilt-inNoNo
Chapter markersBuilt-inNoNo
GIF outputYesYesVia agg
WebP outputYesNoNo

Key Features

  • Line-based DSL โ€” Simple .yr scripts: Type, Enter, Sleep, Exec
  • Paste โ€” Instant text input for long commands
  • Mask / Unmask โ€” Hide secrets in all captured frames
  • WaitFor โ€” Sync on terminal output instead of fragile sleep durations
  • Marker โ€” Annotate chapters for navigation and splitting
  • Themes โ€” Dracula, Nord, Monokai, GitHub Dark, and more
  • Bundled font โ€” JetBrains Mono included, no system font dependencies

Quick Start

# Record and render a scenario
yr render demo.yr --output demo.gif

# Preview in terminal (no rendering)
yr preview demo.yr

# Validate script syntax
yr validate demo.yr

Example Script

Set Shell "powershell -NoProfile"
Set Width 80
Set Height 24
Set Theme "dracula"
Set FontSize 14

Type "echo 'Hello from yr!'"
Enter
Sleep 2s

Type "Get-Process | Select-Object -First 5 Name,CPU"
Enter
Sleep 3s

Directives

Paste โ€” Instant Text Input

Unlike Type (one character at a time), Paste writes everything at once โ€” perfect for long commands that arenโ€™t the focus of your demo.

# Slow, deliberate typing
Type "echo hello"
Enter

# Instant paste for boilerplate
Paste "Get-Process | Sort-Object CPU -Descending | Select-Object -First 5"
Enter

Paste demo

Mask / Unmask โ€” Hide Secrets

Masks replace secret values with asterisks in all captured frames. The secret never appears in any output file.

Env API_KEY "sk-proj-abc123def456"
Mask "sk-proj-abc123def456"

Type "echo $env:API_KEY"
Enter
# Output shows: **********************

Mask demo

WaitFor โ€” Output Synchronization

Replace fragile Sleep durations with output-driven waits. Polls the terminal every 50ms until the pattern appears.

Exec "cargo build"
WaitFor "Finished" 60s

Type "cargo test"
Enter
WaitFor "test result: ok"

WaitFor demo

Marker โ€” Chapter Annotations

Force-capture a frame with a name. Enables chapter navigation, progress bars, and recording splitting.

Marker "Setup"
Type "git clone https://github.com/org/repo.git"
Enter
WaitFor "done."

Marker "Build"
Type "cargo build --release"
Enter
WaitFor "Finished"

Marker demo

Output Formats

FormatExtensionUse Case
GIF.gifDocumentation, GitHub READMEs, universal support
WebP.webpSmaller files, better quality, modern browsers
yrdata.yrdataBinary archive with LZ4 compression for re-rendering

Integration with RAPS

yr is used to create all terminal recordings on this website. The demo showcase and documentation GIFs are rendered from .yr scripts stored in the raps-demo repository.

# Record a RAPS demo
yr render raps-auth.yr --output auth-demo.gif

# Re-render with different theme
yr render raps-auth.yr --output auth-demo.gif --theme nord

Directive Reference

DirectiveSyntaxDescription
SetSet Key "value"Configure shell, dimensions, theme, font
TypeType "text"Type character by character
PastePaste "text"Instant text input
EnterEnterPress Enter
SleepSleep 2sPause for a duration
ExecExec "command"Execute without typing animation
MaskMask "secret"Hide a value in all frames
UnmaskUnmaskClear masks
WaitForWaitFor "pattern" 30sWait for terminal output
MarkerMarker "name"Annotate a chapter
EnvEnv KEY "value"Set environment variable

Related Products