ScriptsApr 13, 2026·3 min read

VHS — Record Terminal Sessions as GIFs and Videos

VHS by Charmbracelet lets you write terminal recordings as code. Define commands in a .tape file, and VHS generates beautiful GIFs, MP4s, or WebMs — perfect for documentation, README demos, and project showcases.

TL;DR
VHS generates GIFs, MP4s, and WebMs from declarative .tape scripts for terminal demos and documentation.
§01

What it is

VHS is a tool by Charmbracelet that turns terminal recordings into code. You write a .tape file describing the commands to execute, and VHS produces high-quality GIFs, MP4s, or WebMs. No screen recording software, no manual trimming, and fully reproducible output.

Developer advocates, open-source maintainers, and documentation writers use VHS to create polished terminal demos for README files, blog posts, and project showcases without the inconsistency of manual screen captures.

§02

How it saves time or tokens

VHS replaces the manual workflow of recording a terminal session, trimming the output, and converting formats. A .tape file is version-controlled and reproducible, so updating a demo for a new version means editing a text file and re-running VHS. No more re-recording from scratch when commands change.

§03

How to use

  1. Install VHS using Homebrew, Go install, or download the binary from the releases page.
  2. Write a .tape file with commands, timing, and display settings.
  3. Run vhs your-file.tape to generate the output GIF, MP4, or WebM.
§04

Example

# demo.tape - VHS recording script
Output demo.gif
Set FontSize 14
Set Width 1200
Set Height 600

Type "echo 'Hello from VHS'"
Enter
Sleep 1s

Type "ls -la"
Enter
Sleep 2s

Type "cat README.md | head -20"
Enter
Sleep 3s
# Generate the GIF
vhs demo.tape
# Output: demo.gif (ready for README or docs)
§05

Related on TokRepo

§06

Common pitfalls

  • Setting Sleep durations too short, making the output feel rushed and hard to follow.
  • Using system-specific commands in .tape files that break on other operating systems or CI environments.
  • Generating very large GIFs by recording long sessions. Keep demos under 30 seconds for README use.

Frequently Asked Questions

What output formats does VHS support?+

VHS supports GIF, MP4, and WebM output formats. You specify the format using the Output directive in the .tape file. GIF is the most common for README files, while MP4 and WebM offer better quality for documentation sites.

Can I use VHS in CI/CD pipelines?+

Yes. VHS runs headlessly and can be executed in CI environments. This lets you auto-generate updated demo GIFs whenever your CLI tool changes, keeping documentation in sync with code.

How do I install VHS?+

On macOS, use brew install charmbracelet/tap/vhs. On Linux, download the binary from the GitHub releases page. VHS also requires ffmpeg and a terminal rendering engine, which are bundled in most installation methods.

Can VHS record interactive applications?+

Yes. VHS can type text, press keys (Tab, Enter, Ctrl+C), and interact with terminal UIs. The .tape format supports key presses, mouse events, and timing controls for recording interactive tools.

Is VHS free and open source?+

Yes. VHS is open source under the MIT license, published by Charmbracelet on GitHub. It is free for personal and commercial use.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets