vhs.js

A simple library to use charmbracelet/vhs to generate terminal gifs

  • vhs.js

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vhs.js
0.0.186 months ago6 months agoMinified + gzip package size for vhs.js in KB

Readme

vhs.js
!npm packagenpm-imgnpm-url !Build Statusbuild-imgbuild-url !Downloadsdownloads-imgdownloads-url !Issuesissues-imgissues-url !Code Coveragecodecov-imgcodecov-url !Commitizen Friendlycommitizen-imgcommitizen-url !Semantic Releasesemantic-release-imgsemantic-release-url
A simple JS library to use https://github.com/charmbracelet/vhs to generate terminal gifs

Install

npm install vhs.js

Usage

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);