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

superimg

v0.0.16

Published

Programmatic video generation with HTML/CSS templates

Readme

SuperImg

Programmatic video generation. TypeScript in, MP4 out.

Quick Start

npm install superimg

Note: Rendering requires Chromium. Run npx superimg setup once to download it.

Create a template:

// hello.video.ts
import { defineScene } from 'superimg'

export default defineScene({
  config: { width: 1920, height: 1080, fps: 30, duration: 3 },
  render(ctx) {
    return `
      <div style="
        width: ${ctx.width}px; height: ${ctx.height}px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex; align-items: center; justify-content: center;
      ">
        <h1 style="font-size: 80px; color: white;">Hello, SuperImg</h1>
      </div>
    `
  },
})

Render it:

npx superimg render hello.video.ts -o hello.mp4

That's it. A function that returns HTML → an MP4 file.

What You Can Build

200 product videos for an e-commerce catalog. Personalized onboarding walkthroughs. Automated social clips from a data feed. Anything where video needs to scale beyond one-at-a-time.

  • Deterministic — Same input, same output. Every frame is testable.
  • Composable — Import functions, reuse components, version control everything.
  • Scalable — One template, any amount of data. Render 1 or 10,000.

Add Animation

Every frame receives a context with a standard library for animation. std.score() breaks the scene into enter/hold/exit phases and t.motion() gives each element a fade-in, transform, and fade-out automatically:

import { defineScene } from 'superimg'

export default defineScene({
  config: { width: 1920, height: 1080, fps: 30, duration: 5 },
  render(ctx) {
    const { std, width, height } = ctx

    // Phases default to enter 15% / hold 70% / exit 15%
    const t = std.score()

    // scale 0.8 → 1 on enter, hold, then auto fade + scale back on exit
    const card = t.motion({ scale: 0.8, easing: 'easeOutCubic' })

    return `
      <div style="
        width: ${width}px; height: ${height}px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex; align-items: center; justify-content: center;
      ">
        <h1 style="font-size: 80px; color: white; ${card.style}">Hello, SuperImg</h1>
      </div>
    `
  },
})

std.score handles phase timing. For custom-progress math (loops, non-phase curves) reach for std.interpolate(progress, inputRange, outputRange, easing?). See the full API →

Data-Driven Templates

Pass data at render time. Same template, different content:

export default defineScene({
  data: {
    productName: 'Widget',
    price: '$99',
  },
  render(ctx) {
    const { data } = ctx
    return `<div>${data.productName} — ${data.price}</div>`
  },
})
# Single video with inline data
npx superimg render template.video.ts --data '{"productName": "Gadget", "price": "$149"}'

# Batch render from a JSON file — one video per entry. Filenames pick a slug
# from each entry's `slug` / `name` / `title` / `id` field (else array index).
npx superimg render template.video.ts --data products.json -y

# Composes with --presets: 10 entries × 2 presets = 20 MP4s in one Playwright session.
npx superimg render template.video.ts --data products.json --presets -y

Multi-Format Output

One template, every platform:

await render(template, { format: 'youtube.video' })        // 1920×1080
await render(template, { format: 'youtube.video.short' })  // 1080×1920
await render(template, { format: 'instagram.post' })       // 1080×1080
await render(template, { format: 'tiktok.video' })         // 1080×1920

Where It Runs

CLI — Render locally or in CI. This is the primary workflow:

npx superimg render hello.video.ts -o video.mp4

# Render every video in the project. Multi-output templates (those declaring
# config.outputs) automatically render all presets; single-output templates
# render once at their default config.
npx superimg render --all -y

Browser — Live preview at 60fps while you edit. Run npx superimg dev hello to start the dev server.

React — Embed videos anywhere with the <Player /> component:

import { Player } from 'superimg/react'
import template from './template'

<Player template={template} width={1280} height={720} />

Packages

| Package | Description | |---------|-------------| | superimg | Core library, CLI, browser player, and React APIs |

npm install superimg           # Core + CLI

With AI Coding Agents

SuperImg ships a skill that teaches your AI coding agent the framework. One command installs it across hosts (Claude Code, Cursor, Codex, Gemini, OpenCode, Pi, Aider, Continue, Windsurf, Copilot):

npx superimg skill install

Codex users can also install the official plugin (skill + MCP tools, versioned, no AGENTS.md edits):

codex marketplace add github.com/anaptfox/superimg
codex plugin install superimg@anaptfox

Documentation

License

MIT