A simple JS library to use [https://github.com/charmbracelet/vhs](the
vhs
tool) to generate terminal gifs
npm install vhs.js
import { exportGif, exportGifToFile } from 'vhs.js';
const tape = `
Require echo
Set Shell "bash"
Set FontSize 32
Set Width 1200
Set Height 600
Type "echo 'Welcome to VHS!'" Sleep 500ms Enter
`;
await exportGifToFile(tape, 'tape.gif');
// or do it in memory
const gifBuffer = await exportGif(tape);