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

@glyphjs/cli

v0.9.1

Published

CLI tool for compiling, rendering, and exporting GlyphJS documents

Readme

@glyphjs/cli

Command-line tool for compiling, rendering, exporting, and serving GlyphJS documents.

Turn Markdown with embedded ui: components into HTML pages, PDFs, DOCX files, or PNG screenshots — all from the terminal.

Installation

npm install -g @glyphjs/cli

Commands

glyphjs compile

Compile a Markdown file to GlyphJS IR (JSON).

glyphjs compile document.md -o output.json
glyphjs compile document.md --compact       # minified JSON
cat document.md | glyphjs compile -          # read from stdin

| Flag | Description | | --------------------- | ------------------------------------ | | -o, --output <path> | Write JSON to file instead of stdout | | --compact | Output minified JSON | | -v, --verbose | Show diagnostics on stderr |

glyphjs render

Render ui: blocks from a Markdown file to PNG screenshots.

glyphjs render document.md -d ./screenshots/
glyphjs render document.md -b block-1 -o hero.png
glyphjs render document.md --theme dark --theme-file ./my-theme.yaml

| Flag | Description | Default | | --------------------------- | --------------------------------------- | ---------------------- | | -o, --output <path> | Output file or directory | <stem>-<blockId>.png | | -d, --output-dir <dir> | Output directory for screenshots | | | -t, --theme <theme> | Base theme: light or dark | light | | --theme-file <path> | YAML file with custom theme variables | | | -b, --block-id <id> | Render only this block | | | -w, --width <px> | Viewport width in pixels | 1280 | | --device-scale-factor <n> | Device scale factor for HiDPI | 2 | | -v, --verbose | Show diagnostics and progress on stderr | |

Requires: Playwright (npm install playwright)

glyphjs export

Export a Markdown file to HTML, PDF, Markdown, or DOCX.

glyphjs export document.md --format html -o output.html
glyphjs export document.md --format pdf -o output.pdf --page-size A4
glyphjs export document.md --format md -o output.md --images-dir ./img/
glyphjs export document.md --format docx -o output.docx

| Flag | Description | Default | | --------------------- | ------------------------------------------ | -------------- | | --format <fmt> | Output format: html, pdf, md, docx | (required) | | -o, --output <path> | Write to file instead of stdout | | | -t, --theme <theme> | Base theme: light or dark | light | | --theme-file <path> | YAML file with custom theme variables | | | -w, --width <px> | Document width in pixels | 800 | | --title <title> | Override document title | | | --page-size <size> | PDF page size (e.g. Letter, A4) | Letter | | --margin <margin> | PDF margin in CSS shorthand | 1in | | --landscape | Use landscape orientation for PDF | | | --images-dir <dir> | Directory for rendered block images (md) | ./images/ | | -v, --verbose | Show diagnostics on stderr | |

Requires: Playwright for pdf and md formats. Pandoc for docx format.

glyphjs serve

Start a development server with live reload.

glyphjs serve document.md
glyphjs serve document.md --port 8080 --open
glyphjs serve document.md --theme-file ./my-theme.yaml

| Flag | Description | Default | | --------------------- | ------------------------------------- | ------- | | -p, --port <port> | Port to listen on | 3000 | | -t, --theme <theme> | Base theme: light or dark | light | | --theme-file <path> | YAML file with custom theme variables | | | --open | Open browser on start | | | -v, --verbose | Show diagnostics on stderr | |

Custom Themes

Create a YAML file to customize the appearance of rendered components:

base: light # or "dark" — which built-in theme to extend

variables:
  --glyph-accent: '#F56400'
  --glyph-surface: '#F5EDE4'
  --glyph-border: '#E0D6CC'
  # ... any --glyph-* CSS custom property

Pass it to any command with --theme-file:

glyphjs export document.md --format html --theme-file my-theme.yaml -o styled.html

Bundled Themes

The CLI ships with example themes in the themes/ directory:

  • warmcraft — Warm tones with earthy oranges, soft creams, and natural accents

Use a bundled theme by pointing --theme-file at it:

glyphjs export document.md --format html --theme-file node_modules/@glyphjs/cli/themes/warmcraft.yaml -o output.html

Prerequisites

| Feature | Dependency | | ---------------------- | ---------------------------------------------------------------- | | render command | Playwrightnpm install playwright | | export --format pdf | Playwright | | export --format md | Playwright (for block screenshots) | | export --format docx | Pandoc |

License

MIT