explaingit

charmbracelet/vhs

19,727GoAudience · developerComplexity · 2/5ActiveLicenseSetup · moderate

TLDR

Write a script to automatically generate animated GIFs or videos of terminal sessions, then run VHS to produce polished, repeatable demos without manual screen recording.

Mindmap

mindmap
  root((repo))
    What it does
      Record terminal sessions
      Generate GIFs and videos
      Automate demo creation
    How it works
      Write tape files
      Execute actions
      Render with ffmpeg
    Use cases
      Document CLI tools
      Create presentations
      Test terminal output
    Tech stack
      Go language
      ffmpeg
      ttyd
    Installation
      Homebrew
      Docker
      Package managers

Things people build with this

USE CASE 1

Create animated GIFs of command-line tool demos for GitHub READMEs and documentation.

USE CASE 2

Generate consistent, reproducible terminal session videos for presentations and tutorials.

USE CASE 3

Write integration tests that verify what your terminal program displays on screen.

USE CASE 4

Document complex CLI workflows by scripting terminal actions instead of manual recording.

Tech stack

Goffmpegttyd

Getting it running

Difficulty · moderate Time to first run · 30min

Requires ffmpeg and ttyd to be installed; VHS itself is a Go binary but dependencies need to be available on PATH.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

VHS is a tool for creating animated GIFs or video recordings of terminal sessions by writing a simple script, called a "tape file", rather than manually screen-recording while you type. Instead of capturing a video in real time, you write out the sequence of actions you want (type this command, press Enter, wait two seconds) in a plain text file, then run VHS to produce a polished, repeatable GIF or video. This means your terminal demos are reproducible and version-controlled just like code. A tape file looks like readable instructions: you specify the output filename, configure the terminal size and font, then list actions like typing a command, pressing a key, or pausing for effect. VHS drives a virtual terminal behind the scenes, executes those actions, and records the result using ffmpeg (a widely used video tool) and ttyd (a terminal-over-browser utility). The output can be a GIF, MP4, or WebM video, or even a sequence of PNG frames. You would reach for VHS when you want to document a command-line tool with a GIF for a GitHub README, create consistent demos for a presentation, or run integration tests that verify what your terminal program actually displays. It can also run as an SSH server so you can use it remotely without installing dependencies locally. VHS is written in Go and installable via Homebrew, package managers, Docker, or a Go install command.

Copy-paste prompts

Prompt 1
How do I write a VHS tape file to record a terminal session showing my CLI tool in action?
Prompt 2
Can you help me create a VHS script that types commands, waits for output, and generates a GIF for my README?
Prompt 3
What's the syntax for pausing, typing, and pressing keys in a VHS tape file?
Prompt 4
How do I configure terminal size, font, and output format (GIF vs MP4) in VHS?
Prompt 5
Can I use VHS to test that my terminal program displays the correct output automatically?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.