VHS: Your CLI Home Video Recorder for Terminal GIFs

VHS: Your CLI Home Video Recorder for Terminal GIFs

Summary

VHS, by Charmbracelet, is an innovative command-line tool designed to record terminal sessions and turn them into high-quality GIFs or videos. It enables scripting terminal interactions with a simple .tape file format, making it ideal for creating consistent demos and integration tests for CLI applications. This project simplifies the process of showcasing command-line tools with dynamic, shareable content.

Repository Info

Updated on January 4, 2026
View on GitHub

Tags

Click on any tag to explore related repositories

Introduction

VHS, by Charmbracelet, is a unique command-line tool designed to record your terminal sessions and turn them into beautiful GIFs or videos. Described as 'Your CLI home video recorder,' VHS allows developers to script terminal interactions using a simple .tape file, ensuring consistent and reproducible demonstrations of CLI tools. It's an essential utility for anyone looking to create engaging visual content for their command-line projects.

Installation

Before installing VHS, ensure you have ttyd and ffmpeg installed and available on your PATH.

You can install VHS using various package managers:

# macOS or Linux
brew install vhs

# Arch Linux
pacman -S vhs

# Nix
nix-env -iA nixpkgs.vhs

# Windows using scoop
scoop install vhs

Alternatively, you can run it via Docker:

docker run --rm -v $PWD:/vhs ghcr.io/charmbracelet/vhs <cassette>.tape

Or, install it directly with Go:

go install github.com/charmbracelet/vhs@latest

Binaries and packages (Debian, RPM) are also available on the releases page.

Examples

Creating a terminal recording with VHS involves writing a .tape file. This file contains a sequence of commands that VHS executes in a virtual terminal.

Here's a basic example:

Output demo.gif
Set FontSize 46
Set Width 1200
Set Height 600
Type "echo 'Welcome to VHS!'"
Sleep 500ms
Enter
Sleep 5s

After creating your demo.tape file, simply run vhs demo.tape to generate demo.gif.

VHS also offers features to record your terminal actions directly into a .tape file and publish your generated GIFs to vhs.charm.sh for easy sharing.

Why Use It

VHS offers several compelling reasons for its adoption. It provides a robust solution for generating consistent and high-quality terminal demos, which is invaluable for documentation, tutorials, and marketing materials. For developers, it serves as an excellent tool for integration testing CLI applications, allowing you to script interactions and verify output against golden files. Its integration with CI pipelines via the charmbracelet/vhs-action ensures that your demos and tests remain up-to-date. Furthermore, the ability to self-host a VHS SSH server allows for remote recording without local dependencies.

Links