Loading...
Loading...
Use when recording terminal demos, creating GIFs of CLI apps, writing VHS tape files, or generating demo recordings for TUI applications. Use when asked to "record a demo", "create a GIF of my CLI", "write a VHS tape", "make a terminal recording", "generate a demo for my TUI", or "set up VHS for CI".
npx skill4agent add antjanus/skillbox record-tui.tape.tape.tapeasciinema# macOS
brew install charmbracelet/tap/vhs ffmpeg ttyd
# Debian/Ubuntu
sudo apt install ffmpeg && sudo snap install ttyd --classic
go install github.com/charmbracelet/vhs@latestvhs --version && ffmpeg -version && ttyd --version| Use Case | Width | Height | FontSize |
|---|---|---|---|
| README GIF | 1200 | 600 | 20 |
| Docs/tutorial | 1400 | 800 | 18 |
| Social media | 1200 | 630 | 22 |
| Full TUI app | 1600 | 900 | 16 |
| Compact CLI demo | 800 | 400 | 20 |
# 1. Output declaration
Output demo.gif
# 2. Requirements (optional)
Require my-app
# 3. Settings (MUST come before commands)
Set Shell "bash"
Set FontSize 20
Set Width 1200
Set Height 600
Set Theme "Catppuccin Frappe"
Set WindowBar Colorful
Set Padding 20
Set TypingSpeed 75ms
# 4. Hidden setup (optional)
Hide
Type "export TERM=xterm-256color"
Enter
Sleep 500ms
Ctrl+L
Show
# 5. Visible interactions
Type "my-app --demo"
Sleep 500ms
Enter
Sleep 2s
# 6. App interactions
Down Down Down
Enter
Sleep 1s
Type "hello world"
Enter
Sleep 3s
# 7. Hidden cleanup (optional)
Hide
Ctrl+c
Sleep 500ms| Command | Example | Purpose |
|---|---|---|
| | Set output (gif/mp4/webm/ascii) |
| | Configure settings |
| | Emulate typing |
| | Type at specific speed |
| | Key presses |
| | Navigation (with repeat) |
| | Modifier combos |
| | Pause (ms or s) |
| | Wait for screen content |
| | Control recording visibility |
| | Capture current frame |
| | Set env variable |
| | Include another tape |
| | Fail if not in PATH |
# Generate and preview
vhs validate demo.tape # Check syntax
vhs demo.tape # Record# Quick preview without saving
vhs demo.tape --output /dev/null
# Test specific section — use Source to split tapes
vhs section-test.tapeSourceSet Framerate 15 # Lower framerate (default 30)
Set PlaybackSpeed 1.5 # Speed up slow parts
Set Width 800 # Smaller dimensionsgifsicle -O3 --lossy=80 demo.gif -o demo-optimized.gifSleep 500msSleep 2-3sSleep 3-5sSet LoopOffset 0%Type@100msType@30msname: Record Demo
on:
push:
branches: [main]
paths:
- "demo.tape"
- "src/**"
jobs:
record:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Record demo
uses: charmbracelet/vhs-action@v2
with:
path: "demo.tape"
- name: Commit updated GIF
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: update demo recording"
file_pattern: "*.gif"Output demo.ascii
# ... your interactions ...# In CI: compare against committed golden file
vhs demo.tape
diff demo.ascii demo.ascii.golden# Clear output declaration
Output demo.gif
# Explicit dependency
Require gum
# All settings grouped at top
Set Shell "bash"
Set FontSize 20
Set Width 1200
Set Height 600
Set Theme "Catppuccin Frappe"
Set WindowBar Colorful
Set TypingSpeed 75ms
Set Padding 20
# Hidden setup — always Ctrl+L before Show to clear the screen
Hide
Type "export GLAMOUR_STYLE=dark"
Enter
Sleep 500ms
Ctrl+L
Show
# Deliberate pacing — viewer can follow
Type "gum choose 'Option A' 'Option B' 'Option C'"
Sleep 500ms
Enter
Sleep 1s
# Navigate with visible pauses
Down
Sleep 300ms
Down
Sleep 300ms
Enter
Sleep 2s
# Generous final pause for loop
Sleep 3s# Missing Output declaration — VHS won't know where to save
# Settings scattered throughout (will error or be ignored)
Type "my-app"
Set FontSize 20
Enter
Set Theme "Dracula"
# No Sleep after Enter — output flashes by
Type "my-app run"
Enter
Type "my-app status"
Enter
# No final Sleep — GIF loops abruptly
# No Require — silently fails if app missingOutput demo.gif
Set Width 600
Set Height 300
# Too small — TUI elements will be cramped and unreadable
Type "lazygit"
Enter
# No Sleep — app hasn't loaded yet, next keys arrive too early
Tab Tab Tab Tab Tab
# Rapid-fire navigation — viewer can't follow what's happening
Type "c"
Type "feat: add feature"
Enter
# No pauses between actions — looks like a blurSet Framerate 15 # Lower from default 30
Set PlaybackSpeed 1.0 # Don't speed upHide
Env TERM "xterm-256color"
Type "stty rows 50 cols 120"
Enter
Sleep 500ms
Ctrl+L
ShowSleep 1-3sType "my-tui"
Enter
Sleep 2s # Wait for app to initialize
Down # Now safe to interactWaitType "my-tui"
Enter
Wait+Screen /ready/ # Wait until "ready" appears on screen
Down# macOS
brew install charmbracelet/tap/vhs ffmpeg ttyd
# Verify all three
vhs --version && ffmpeg -version && ttyd --versionSet Width 800Set Height 400Set Framerate 15Set PlaybackSpeed 1.5gifsicle -O3 --lossy=80 demo.gif -o demo-small.gif<video>vhs validate demo.tape # Check syntax
vhs demo.tape # Record
vhs demo.tape --output custom.gif # Custom output path
vhs themes # List available themes
vhs new demo.tape # Create tape from template| Command | Purpose |
|---|---|
| Set output file and format |
| Fail if dependency missing |
| Configure terminal settings |
| Emulate typing |
| Type at specific speed |
| Key presses |
| Navigation |
| Modifier key combos |
| Pause execution |
| Wait for screen content |
| Control recording visibility |
| Capture current frame |
| Set environment variable |
| Include another tape file |