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

@verano-20/cat-md

v0.1.0

Published

catmd: cat for markdown, upgraded — renders mermaid fences as inline terminal images (kitty graphics protocol: Ghostty, kitty)

Readme

catmd

cat for markdown. Output is your file, verbatim — except where catmd can render something better in the terminal.

Feature #1: mermaid. ```mermaid fences become actual diagram images inline, in place of the fence source.

catmd rendering demo/demo.md: a typed command followed by the document with its mermaid diagrams shown as images

npm install -g @verano-20/cat-md
catmd DESIGN.md

(The npm package is scoped — catmd was squatted years ago — but the command it installs is plain catmd.)

Why

Terminal markdown renderers (glow, mdcat) print mermaid fences as code blocks — mermaid needs a browser engine to lay out. Browser previews take you out of the terminal. catmd renders each fence headlessly (via mermaid-cli) and paints the result straight into the terminal with the kitty graphics protocol.

  • Uniform, readable text: every diagram is displayed so mermaid's base font matches your terminal's text height — computed live from your terminal's actual cell size — regardless of how big the diagram is.
  • Zoom: each diagram gets a dim ⌕ zoom caption; cmd/ctrl+click opens the full-resolution PNG in your image viewer.
  • Fast after the first look: renders are cached in ~/.cache/catmd. One browser instance renders every diagram in a doc; fully-cached docs never launch a browser at all.
  • Safe in pipes: when stdout isn't a supported TTY, output is byte-identical to the input — it degrades to plain cat, so catmd x.md | grep … just works.
  • Terminal-limit aware: kitty/Ghostty silently drop images over 10000px a side or over the image storage budget; catmd caps renders under both with a quality-preserving vector re-render.

Usage

catmd [options] [file]         # reads stdin when no file is given

--theme <name>       mermaid theme: default, dark, forest, neutral
--text-size <n>      diagram text height in terminal rows (default 1.0)
--force              emit images even when stdout is not a supported TTY

Invalid mermaid prints a warning to stderr and passes the original fence through; the rest of the document still renders.

Requirements

  • Node >= 22.12. Installing pulls in puppeteer, which downloads a headless Chromium (mermaid rendering needs a browser engine — there is no lighter way).
  • A terminal that speaks the kitty graphics protocol: Ghostty or kitty are detected automatically. Other terminals degrade to plain cat with a hint on stderr. WezTerm can work if you've set enable_kitty_graphics = true — run with --force (it's not auto-detected because that support is off by default).

Roadmap

Candidate features, in the same spirit — verbatim output except where the terminal can do better:

  • LaTeX/KaTeX blocks as rendered images
  • Linked/embedded raster images inline
  • Opt-in prose styling (headers, emphasis) that stays pipe-safe

Alternatives

  • glow / mdcat — beautiful markdown, but mermaid fences stay source code.
  • presenterm — renders mermaid inline, but it's a slide presenter and wants slide-structured input.
  • mmdc + an image viewer — works, but per-invocation browser launches and no document flow.

Development

npm test                    # unit suite (fast, no browser)
npm run test:integration    # real renders through headless Chromium
npm run typecheck
npm run build
node scripts/make-demo.mjs  # regenerate demo/demo.gif from demo/demo.md

MIT.