VHS
Terminal recorder from Charm that creates GIFs, PNGs, MP4s, and WebMs from scripted "tape" files. Run via nix run nixpkgs#vhs -- <file>.tape.
Tape File Structure
A tape file is a sequence of commands that describe terminal interactions:
Output output.gif # or .png, .mp4, .webm
Set Shell "bash"
Set FontSize 14
Set Width 1200
Set Height 600
Set Theme "Catppuccin Mocha"
Hide # Hide typed commands from output
Type "echo hello"
Enter
Sleep 1s
Show # Show commands again
Commands
Type "text"— type text into the terminalEnter,Tab,Escape,Space— press keysCtrl+x,Alt+x— key combinationsUp,Down,Left,Right— arrow keysSleep 1s— wait (supportsmsandsunits)Screenshot file.png— capture the current frame
Settings
| Setting | Example | Purpose |
| ------------------------------ | ----------------- | ----------------------- |
| Set Shell "bash" | Set Shell "zsh" | Which shell to use |
| Set FontSize 14 | Set Width 1200 | Terminal dimensions |
| Set Theme "Catppuccin Mocha" | Set Padding 20 | Color theme and padding |
| Set WindowBar Colorful | — | Window decorations |
Example: TUI Screenshot
Output screenshots/demo.png
Set Shell "bash"
Set FontSize 14
Set Width 1400
Set Height 800
Set Theme "Catppuccin Mocha"
Hide
Type "cd /path/to/project && my-tui-app"
Enter
Sleep 2s
Show
Ctrl+p
Sleep 1s
Screenshot screenshots/demo.png
Escape
Type "q"
Enter
Tips
- Use
Hide/Showto control whether typed commands appear in the output Sleeptiming is critical — give apps time to render before capturing- List available themes:
nix run nixpkgs#vhs -- themes