vhs
VHS Crystal
Crystal port of the charmbracelet/vhs Go library for writing terminal GIFs as code.
VHS creates terminal GIFs and videos for integration testing, demos, and documentation via simple tape files.
Note: This is a work-in-progress port. The Go implementation in the
vendor/vhssubmodule is the authoritative source. This Crystal library aims to provide API parity and produce identical output.
Installation
Add this shard to your shard.yml:
dependencies:
vhs:
github: dsisnero/vhs
Then run shards install.
For command-line usage, build the binary:
make build
The vhs executable will be placed in bin/.
Usage
Create a .tape file:
Output demo.gif
Set FontSize 16
Set Width 800
Set Height 600
Type "echo 'Hello from Crystal VHS!'"
Sleep 500ms
Enter
Sleep 2s
Run it:
vhs demo.tape
This generates demo.gif with the terminal session.
See the VHS Command Reference for all available commands.
Development
This project follows the Go vhs implementation closely. The Go source lives in the vendor/vhs git submodule and serves as the reference.
Setup
- Clone with submodules:
git clone --recurse-submodules https://github.com/dsisnero/vhs
- Install dependencies:
- Crystal (>= 1.19.1)
ttydandffmpeg(required by VHS, see vendor README)
Building
make build
Testing
make test
Code Quality
make lint
Run make help for all available targets.
Contributing
- Fork it (https://github.com/dsisnero/vhs/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Dominic Sisneros — creator and maintainer
vhs
- 0
- 0
- 0
- 0
- 6
- about 4 hours ago
- February 11, 2026
MIT License
Thu, 12 Feb 2026 18:58:48 GMT