A simple library to use charmbracelet/vhs to generate terminal gifs
npm install vhs.jsvhs.js[![npm package][npm-img]][npm-url]
[![Build Status][build-img]][build-url]
[![Downloads][downloads-img]][downloads-url]
[![Issues][issues-img]][issues-url]
[![Code Coverage][codecov-img]][codecov-url]
[![Commitizen Friendly][commitizen-img]][commitizen-url]
[![Semantic Release][semantic-release-img]][semantic-release-url]
> A simple JS library to use vhs tool" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">https://github.com/charmbracelet/vhs to generate terminal gifs
``bash`
npm install vhs.js
`ts
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);
``
[build-img]:https://github.com/orf/vhs.js/actions/workflows/release.yml/badge.svg
[build-url]:https://github.com/orf/vhs.js/actions/workflows/release.yml
[downloads-img]:https://img.shields.io/npm/dt/vhs.js
[downloads-url]:https://www.npmtrends.com/vhs.js
[npm-img]:https://img.shields.io/npm/v/vhs.js
[npm-url]:https://www.npmjs.com/package/vhs.js
[issues-img]:https://img.shields.io/github/issues/orf/vhs.js
[issues-url]:https://github.com/orf/vhs.js/issues
[codecov-img]:https://codecov.io/gh/orf/vhs.js/branch/main/graph/badge.svg
[codecov-url]:https://codecov.io/gh/orf/vhs.js
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]:https://github.com/semantic-release/semantic-release
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]:http://commitizen.github.io/cz-cli/