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

@shader-gallery/cli

v0.1.0

Published

The consumer CLI engine behind `npx shader-gallery`: vendor a shader.gallery shader into your project as one self-contained single-file .frag (embedded /*@shader*/ header + GLSL). The offline/bundled complement to runtime fetch-by-slug.

Readme

@shader-gallery/cli

The consumer CLI engine behind npx shader-gallery.

Most people never install this directly — they run the unscoped front-door:

npx shader-gallery add billow

which is a thin package (published from the catalog repo) that forwards to this engine. Installing @shader-gallery/cli gives you the same commands under the sg bin (npx @shader-gallery/cli add …, or sg add … when linked).

add <slug> — vendor a shader into your project

Downloads one shader from the gallery and writes it as a self-contained single-file effect: an embedded /*@shader … */ header (the catalog metadata) followed by the GLSL. This is the offline/bundled complement to fetching by slug at runtime (<ShaderGalleryBg slug="billow">) — the frag is committed into your project, so there is no runtime CDN dependency and you can edit it in place.

shader-gallery add <slug> [options]

  -o, --out <dir|file>   where to write (default ./shaders/<slug>.frag;
                         a path ending in .frag is used verbatim, else a dir)
      --base <url|dir>   catalog origin (default https://shader.gallery/cdn/shaders/);
                         pass a tunnel/localhost URL or a local catalog dir
  -f, --force            overwrite an existing file
      --stdout           print the effect to stdout instead of writing

Render the written file with the runtime via @shader-gallery/components' vanilla shader() factory, or any framework wrapper, by bundling it as raw text:

import frag from './shaders/billow.frag?raw';
import { shader } from '@shader-gallery/components';

shader(frag).mount('#bg');

The catalog frags are already fully self-contained GLSL, so a vendored frag passes sg-validate unchanged — add only prepends the header, it never rewrites the GLSL.

new <slug> — scaffold a fresh effect

Writes a valid, self-contained starter .frag you can author from. It passes sg-validate as-is and renders a live, palette-cycling background out of the box, so new + dev shows something moving immediately.

shader-gallery new <slug> [options]

  -o, --out <dir|file>   where to write (default ./<slug>.frag)
      --name <title>     display name (default derived from the slug)
      --family <name>    catalog family for the header (default Aura)
  -f, --force            overwrite an existing file
      --stdout           print the effect to stdout instead of writing

The GLSL is intentionally self-contained (no //@sg-include prelude): the prelude is only expanded at catalog-import time, so pull it in (via @shader-gallery/components' sg-import) when you promote the shader into the catalog.

dev <file.frag> — live preview with param sliders

Serves a local browser preview that renders the frag with @shader-gallery/runtime, builds a slider per declared param and a palette picker from the header, and live-reloads (re-mounting, keeping your slider values) whenever you save the file.

shader-gallery dev <file.frag> [options]

      --port <n>          port to serve on (default 5173)
      --runtime <dir|url> @shader-gallery/runtime location (default: auto-detect a
                          local checkout/node_modules; or a CDN ESM url)
      --open              open the preview in your browser

The runtime is not bundled (this package stays zero-dependency) — dev resolves it from a local checkout / node_modules, or you point --runtime at a published CDN ESM bundle.

Roadmap

add, new, and dev ship in this version. Possible later additions: a --types flag on add/new (emit a .d.ts via sg-typegen), and a shader picker when the add slug is omitted.

License

MIT © E. T. Carter. Part of shader.gallery.