Terminal Recordings
Create terminal recordings for CLI demos using VHS.
Prerequisites
brew install vhs ffmpegQuick Start
cd packages/cli
# Record both demos
pnpm demo:record
# Record individually
pnpm demo:record:full # Full demo (~60s)
pnpm demo:record:quick # Quick demo (~15s)Demo Mode
The CLI has a built-in demo mode that mocks Touch ID and API calls:
export PWM_DEMO_MODE=true
pwm entry list # Uses mock dataThis is set automatically in the tape files.
Tape Files
VHS uses .tape files to script terminal sessions:
# Output settings
Output demo.gif
# Terminal appearance
Set Width 1000
Set Height 650
Set FontSize 16
Set FontFamily "Menlo"
Set Theme "nord"
# Commands
Type "pwm entry list"
Enter
Sleep 3s
Available Demos
| File | Output | Duration |
|---|---|---|
demo.tape | demo.gif | ~60s |
demo-quick.tape | demo-quick.gif | ~15s |
Publishing
After recording:
# Copy to CDN
cp demo.gif ../cdn/public/cli-demo.gif
cp demo-quick.gif ../cdn/public/cli-demo-quick.gif
# Deploy
pnpm --filter @pwm/cdn deploy:productionLive URLs:
Customization
Font & Theme
Set FontFamily "Menlo" # macOS native
Set Theme "nord" # Dark theme
Set WindowBar Colorful # macOS window style
Timing
Set TypingSpeed 50ms # Keystroke speed
Set PlaybackSpeed 1 # 1x playback
Sleep 3s # Pause duration
zsh Comments
Enable comments in zsh:
Hide
Type "setopt INTERACTIVE_COMMENTS && export PWM_DEMO_MODE=true"
Enter
Show