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

@spirograph/cli

v0.1.2

Published

Spirograph CLI: generate PNG/SVG files directly from query/JSON params, based on @spirograph/core

Readme

@spirograph/cli

Spirograph pattern generation command-line tool: turns a URL query (or JSON) directly into PNG / SVG files. Built on @spirograph/core — the exact same query engine as the web image endpoint, so a CLI result matches the browser output byte-for-byte in colors and geometry.

$ spirograph generate --params "ring=72&rolling=30&pen=40,e63946,2.5&pen=75,2,1d6fa5" --format png --size 512
✓ generated PNG → spirograph.png (71231 bytes)

Install

npm install -g @spirograph/cli   # or: npx @spirograph/cli

Usage

spirograph generate --params "ring=72&rolling=30&pen=40,2.5,e63946&pen=75,2,1d6fa5" --format png --size 2048 --out out.png
spirograph generate --params "ring=72&rolling=30&pen=40,2.5,10,e63946,1d6fa5,f4a261" --format svg --out out.svg
spirograph generate --json '{"ringTeeth":72,"rollingTeeth":30,"pens":[{"hole":40,"colors":["#e63946"],"width":2.5}]}' --format png
spirograph --help

Options

| Option | Description | |---|---| | --params <query> | URL query (same format as web share links / image endpoints) | | --json <json> | SpirographState JSON (takes precedence over --params) | | --format <fmt> | png / svg (default png) | | --size <n> | PNG size 64–4096 (default 1000) | | --out <path> | output path (default spirograph.<fmt>) |

Params

--params accepts the same keys as the web app / image endpoint:

| Param | Meaning | Range | |---|---|---| | ring | ring gear teeth | 40–240 | | rolling | rolling gear teeth | 8–96 | | mode | drawing mode | inside / outside | | pen | one pen (repeatable): hole,width,color1 solid, or hole,width,spacing,color1[,color2…] gradient | hole 0–100 / width 0.5–8 / spacing 1–100 | | bg | background color | 6-digit hex (no #) | | size | png size | 64–4096 |

Development

npm run build   # tsc -b → dist/cli.js (bin: spirograph)
node dist/cli.js generate --params "ring=72&rolling=30&pen=40,2.5,e63946"

↳ Part of the spirograph-generator monorepo. Preview what the CLI outputs at https://leiwan5.github.io/spirograph/.