# vhs **Repository Path**: mirrors_ysmood/vhs ## Basic Information - **Project Name**: vhs - **Description**: Your CLI home video recorder 📼 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-10-31 - **Last Updated**: 2026-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # VHS


Latest Release Go Docs Build Status

Write terminal GIFs as code for integration testing and demoing your CLI tools. Welcome to VHS The above example was generated with VHS ([view source](./examples/neofetch/neofetch.tape)). ## Tutorial To get started, [install VHS](#installation) and create a new `.tape` file. ```sh vhs new demo.tape ``` Open the `.tape` file with your favorite `$EDITOR`. ```sh vim demo.tape ``` Tape files consist of a series of [commands](#vhs-command-reference). The commands are instructions for VHS to perform on its virtual terminal. For a list of all possible commands see [the command reference](#vhs-command-reference). ```elixir # 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... Sleep 500ms # 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. ```sh vhs < demo.tape ``` All done! You should see a new file called `demo.gif` (or whatever you named the `Output`) in the directory. A GIF produced by the VHS code above For more examples see the [`examples/`](https://github.com/charmbracelet/vhs/tree/main/examples) directory. ## Installation > **Note** > VHS requires [`ttyd`](https://github.com/tsl0922/ttyd) and [`ffmpeg`](https://ffmpeg.org) to be installed and available on your `PATH`. Use a package manager: ```sh # macOS or Linux brew install charmbracelet/tap/vhs ffmpeg brew install ttyd --HEAD # Arch Linux (btw) yay -S vhs-bin # Nix nix-env -iA nixpkgs.vhs # Debian/Ubuntu sudo mkdir -p /etc/apt/keyrings curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list # Install ttyd from https://github.com/tsl0922/ttyd/releases sudo apt update && sudo apt install vhs ffmpeg # Fedora/RHEL echo '[charm] name=Charm baseurl=https://repo.charm.sh/yum/ enabled=1 gpgcheck=1 gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo # Install ttyd from https://github.com/tsl0922/ttyd/releases sudo yum install vhs ffmpeg # Void Linux sudo xbps-install vhs ``` Or, use Docker to run VHS directly, dependencies included: ```sh docker run --rm -v $PWD:/vhs ghcr.io/charmbracelet/vhs .tape ``` Or, download it: * [Packages][releases] are available in Debian and RPM formats * [Binaries][releases] are available for Linux, macOS, and Windows Or, just install it with `go`: ```sh go install github.com/charmbracelet/vhs@latest ``` [releases]: https://github.com/charmbracelet/vhs/releases ## The VHS Server VHS has an SSH server built in! When you self host VHS you can access it as though it were installed locally. VHS will have access to commands and applications on the host so you don't need to install them on your machine. To start the server run: ```sh vhs serve ```
Configuration Options * `VHS_PORT`: The port to listen on (`1976`) * `VHS_HOST`: The host to listen on (`localhost`) * `VHS_GID`: The Group ID to run the server as (current user's GID) * `VHS_UID`: The User ID to run the server as (current user's UID) * `VHS_KEY_PATH`: The path to the SSH key to use (`.ssh/vhs_ed25519`) * `VHS_AUTHORIZED_KEYS_PATH`: The path to the authorized keys file (empty, publicly accessible)
Then, simply access VHS from a different machine via `ssh`: ```sh ssh vhs.example.com < demo.tape > demo.gif ``` ## VHS Command Reference > **Note** > You can view all VHS documentation on the command line with `vhs manual`. There are a few basic types of VHS commands: * [`Output `](#output): specify file output * [`Set Value`](#settings): set recording settings * [`Type ""`](#type): emulate typing * [`Left`](#arrow-keys) [`Right`](#arrow-keys) [`Up`](#arrow-keys) [`Down`](#arrow-keys): arrow keys * [`Backspace`](#backspace) [`Enter`](#enter) [`Tab`](#tab) [`Space`](#space): special keys * [`Ctrl+`](#ctrl): press control + key * [`Sleep