← All tools

charmbracelet/vhs

Popularity 75 Updated Content & Media

Your CLI home video recorder 📼

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

VHS

<p <img src="https://user-images.githubusercontent.com/42545625/198402537-12ca2f6c-0779-4eb8-a67c-8db9cb3df13c.png#gh-dark-mode-only" width="500" / <img src="https://user-images.githubusercontent.com/42545625/198402542-a305f669-a05a-4d91-b18b-ca76e72b655a.png#gh-light-mode-only" width="500" / <br <a href="https://github.com/charmbracelet/vhs/releases"<img src="https://img.shields.io/github/release/charmbracelet/vhs.svg" alt="Latest Release"</a <a href="https://pkg.go.dev/github.com/charmbracelet/vhs?tab=doc"<img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="Go Docs"</a <a href="https://github.com/charmbracelet/vhs/actions"<img src="https://github.com/charmbracelet/vhs/workflows/build/badge.svg" alt="Build Status"</a </p

Write terminal GIFs as code for integration testing and demoing your CLI tools.

<img alt="Welcome to VHS" src="https://stuff.charm.sh/vhs/examples/neofetch3.gif" width="600" /

The above example was generated with VHS (view source).

Tutorial

To get started, install VHS and create a new .tape file.

vhs new demo.tape

Open the .tape file with your favorite $EDITOR.

vim demo.tape

Tape files consist of a series of commands. The commands are instructions for VHS to perform on its virtual terminal. For a list of all possible commands see the command reference.

# Where should we write the GIF?
Output demo.gif

# Set up a 1200x600 terminal with 46px font.
Set FontSize 46
Set Width 1200
Set Height 600

# Type a command in the terminal.
Type "echo 'Welcome to VHS!'"

# Pause for dramatic effect...

Run the command by pressing enter.

Enter

Admire the output for a bit.

Sleep 5s


Once you've finished, save the file and feed it into VHS.

vhs demo.tape