npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oakoliver/vhs

v1.0.3

Published

Write terminal GIFs as code. TypeScript port of Charmbracelet's VHS.

Readme

@oakoliver/vhs

Write terminal GIFs as code. TypeScript port of Charmbracelet's VHS.

VHS lets you record terminal sessions and create GIFs, MP4s, and WebM videos using a simple scripting language called .tape files.

Installation

npm install @oakoliver/vhs
# or
bun add @oakoliver/vhs

Prerequisites

VHS requires these external tools:

  • ttyd - Terminal emulator in the browser
  • ffmpeg - Video encoding
# macOS
brew install ttyd ffmpeg

# Ubuntu/Debian
apt install ttyd ffmpeg

# Windows (via scoop)
scoop install ttyd ffmpeg

CLI Usage

# Record a tape file to GIF
npx @oakoliver/vhs record demo.tape

# Create a new tape file
npx @oakoliver/vhs new demo.tape

# Validate a tape file
npx @oakoliver/vhs validate demo.tape

# List available themes
npx @oakoliver/vhs themes

# Show manual/documentation
npx @oakoliver/vhs manual

Tape File Syntax

Tape files use a simple, readable syntax to describe terminal recordings:

# demo.tape - A simple VHS demo
Output demo.gif

Set FontSize 18
Set Width 1200
Set Height 600
Set Theme "Dracula"

Type "echo 'Hello, World!'"
Enter
Sleep 500ms

Type "ls -la"
Enter
Sleep 1s

Type "exit"
Enter

Commands

| Command | Description | Example | |---------|-------------|---------| | Output | Set output file (.gif, .mp4, .webm) | Output demo.gif | | Type | Type text with realistic timing | Type "hello world" | | Type@<speed> | Type with custom speed | Type@50ms "fast" | | Sleep | Pause for duration | Sleep 500ms / Sleep 2s | | Enter | Press Enter key | Enter / Enter 3 | | Backspace | Press Backspace | Backspace 5 | | Tab | Press Tab | Tab | | Space | Press Space | Space | | Up/Down/Left/Right | Arrow keys | Up 3 | | Ctrl+<key> | Control key combo | Ctrl+c | | Alt+<key> | Alt key combo | Alt+Tab | | Hide | Hide following commands from output | Hide | | Show | Show commands again | Show | | Screenshot | Take a screenshot | Screenshot screen.png | | Wait | Wait for text/regex in terminal | Wait /\$\s/ | | Env | Set environment variable | Env FOO "bar" | | Source | Include another tape file | Source setup.tape |

Settings

Set Shell "bash"
Set FontFamily "JetBrains Mono"
Set FontSize 16
Set Width 1200
Set Height 600
Set Padding 20
Set Theme "Dracula"
Set TypingSpeed 50ms
Set Framerate 60
Set PlaybackSpeed 1.0
Set CursorBlink false

Programmatic API

import { 
  parseTape, 
  Lexer, 
  Parser,
  VHSOptions, 
  defaultVHSOptions,
  makeGIF,
  makeMP4,
  makeWebM
} from '@oakoliver/vhs';

// Parse a tape file
const { commands, errors } = parseTape(`
  Output demo.gif
  Type "hello"
  Enter
`);

if (errors.length > 0) {
  console.error('Parse errors:', errors);
} else {
  console.log('Commands:', commands);
}

// Work with the lexer directly
const lexer = new Lexer('Type "hello" Enter');
const tokens = lexer.tokenize();

// Work with the parser
const parser = new Parser(new Lexer(tapeContent));
const result = parser.parse();

// FFmpeg filter builders
const gifFilters = makeGIF(60, 15); // framerate, max colors
const mp4Filters = makeMP4();
const webmFilters = makeWebM();

Themes

VHS includes 300+ terminal themes. List them with:

npx @oakoliver/vhs themes

Popular themes include:

  • Dracula
  • One Dark
  • Nord
  • Solarized Dark/Light
  • Gruvbox
  • Tokyo Night
  • Catppuccin

Examples

Basic Demo

Output demo.gif
Set Theme "Dracula"
Set FontSize 18

Type "npm create vite@latest my-app"
Enter
Sleep 2s

Hidden Setup

Output demo.gif

# Setup (hidden from recording)
Hide
Type "cd ~/projects"
Enter
Type "clear"
Enter
Show

# Visible demo
Type "node --version"
Enter
Sleep 1s

Interactive Application

Output demo.gif
Set Width 1200
Set Height 800

Type "npx create-react-app my-app"
Enter
Sleep 3s

# Navigate with arrow keys
Down
Down
Enter
Sleep 500ms

# Exit with Ctrl+C
Ctrl+c

Compatibility

  • Node.js 18+
  • Bun
  • Deno

Credits

This is a TypeScript port of Charmbracelet's VHS, originally written in Go.

Part of the @oakoliver Charm ecosystem ports:

License

MIT - see LICENSE for details.

Original VHS by Charmbracelet is also MIT licensed.