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

spine-cli

v1.0.1

Published

CLI to render exported Spine 2D skeletal assets to images/video and report skeleton info.

Readme

spine-cli

CLI for exported Spine 2D skeletal assets. Render animations to images/video, report skeleton info.

What it does

Operates on Spine runtime exports (.json + .atlas/.atlas.txt + PNG textures).

  • render: rasterize an animation to pngseq (default), png (single frame), gif, mp4, webm, webp, apng.
  • info: Spine version, animations + durations, skins, bone/slot/attachment/constraint counts, mesh/clipping flags, atlas pages/resolution + missing-texture check.

How it works

  • Rendering: spine-ts WebGL backend in headless Chromium (Playwright), screenshotting frames. WebGL for full mesh + clipping fidelity (both common in targets).
  • Version dispatch: bundles spine-ts 4.0 + 4.2, picks per-skeleton from embedded "spine" field (format broke at 4.1; targets straddle it).
  • Input resolution: pass a .json; single sibling *.atlas.txt/*.atlas auto-resolved (--atlas overrides); textures relative to atlas dir. Also accepts dir or glob for batch.
  • Video (mp4/webm): shells out to ffmpeg (detected on PATH). mp4 defaults white (no alpha); webm defaults transparent.
  • Animated webp: shells out to img2webp (a libwebp tool), not ffmpeg. Every frame is a key frame (-kmax 0) so nothing blends across frames and transparency stays exact; ffmpeg's libwebp blends with no disposal control and leaves trails behind moving semi-transparent pixels. Lossless with full alpha by default; pass --quality 0-100 for a smaller lossy file.

Usage

spine-cli info <skeleton.json> [--atlas <path>] [--json] [--verbose]

spine-cli render <skeleton.json | dir | glob>
    [--atlas <path>]
    --animation <name|all>                     # error+lists names if multiple and omitted
    --format <pngseq|png|gif|mp4|webm|webp|apng> # default pngseq
    --out <path> | --out-dir <dir>
    --fps <n>                                   # default 30
    --scale <f> | --width <px> --height <px>    # default --scale 1.0
    --fit <declared|bounds|piece|shared>        # default declared (skeleton width/height)
    --piece <glob>                              # render only these slots; repeatable
    --skin <name>
    --duration <sec> --loops <n>
    --frame <t>                                 # single still for --format png
    --background <color|transparent>            # default transparent; white for mp4
    --quality <0-100>                           # webp lossy quality; omit for lossless
    --concurrency <n> --dry-run

Batch writes {skeleton}_{animation}.{ext} beside each input or into --out-dir.

If a skeleton has more than one animation, --animation <name|all> is required (the error lists the names). When a directory holds multiple atlases and none matches the skeleton basename, pass --atlas.

Pieces

Render a subset of a skeleton's slots as its own output. Each --piece is one or more comma-joined slot globs (*, ?); a slot joins the piece if any glob matches. --piece is repeatable, one output per flag, named {skeleton}_{animation}_{piece}.{ext}.

--fit controls the framing box, which matters when pieces are meant to stack as layers:

  • piece: each piece tight to its own bounds. Smallest files; pieces do not align.
  • shared: all selected pieces share one box (their combined bounds). Stack the layers and they realign.
  • bounds: shared box spanning the whole skeleton (all slots). Same alignment, more margin.
  • declared: shared box is the declared artboard.

Boxes are the union across every frame of the clip, so an animated piece keeps a stable size instead of jittering. piece and shared require at least one --piece.

# three stackable layers of one animation, aligned in the artboard
spine-cli render VaultSetup.json -a State0-OpenIdle --format apng --fit shared \
    --piece "Redux/VaultDoorIsolated/*" --piece "Chips/*" --piece "images/*"

Prerequisites

  • Chrome or Chromium on the system (rendering runs headless via playwright-core, launched with channel: "chrome").
  • ffmpeg on PATH only for mp4/webm; img2webp (from libwebp) on PATH only for webp. The image formats (pngseq, png, gif, apng) need nothing extra.

Scripts

| script | command | does | | -------------------- | ------------------------------ | -------------------------- | | pnpm build | build-harness.mjs && vp pack | build harness bundle + cli | | pnpm build:harness | build-harness.mjs | rebuild the browser bundle | | pnpm dev | vp pack --watch | rebuild the cli on change | | pnpm check | vp check | format + lint + typecheck |

The browser render harness (spine-ts 4.0 + 4.2) bundles to dist-harness/harness.js via esbuild; rerun pnpm build:harness after editing src/render/harness/.