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

@marttinn/mdpreview

v0.2.0

Published

Markdown preview in your terminal — big headings, real images, drawn mermaid diagrams. Zero runtime dependencies, runs on Node.

Downloads

445

Readme

mdpreview

Markdown, preview in your terminal — the way a browser would show it, mapped to what a terminal can show. Zero dependencies

mdpreview README.md              # render
mdpreview --tui doc.md           # full-screen pager: j/k scroll, / search, q quit
mdpreview --tui --watch doc.md   # live preview, re-renders on save

mdpreview rendering headings, lists, a quote, code, and a box-drawn table

scrolling a document whose images render as real pixels in the terminal

Real pixels, in a terminal — examples/gallery.md, artworks via The Met Open Access.

Install

npm install -g @marttinn/mdpreview   # or try it first: npx @marttinn/mdpreview README.md

Requires Node ≥ 22. Also runs on Bun, which adds JPEG/WebP/GIF image decoding (Node renders PNG only).

Or build a standalone binary from a clone: bun run build:binary./mdpreview.

What renders

  • Headings become visual hierarchy: h1 draws big everywhere — true double-height glyphs where a protocol exists (iTerm2/WezTerm/xterm, kitty), a built-in pixel font in every other terminal
  • Images render as real pixels (kitty/iTerm2 graphics, JPEG auto-transcoded) or as universal cell-art mosaics — including inside the pager (--images)
  • Tables become box-drawn aligned grids; links clickable text (OSC 8); paragraphs reflow to your width
  • Mermaid flowcharts (flattened subgraphs, long links, feedback cycles), responsive sequence diagrams (loop/alt frames, notes), pie charts, and git graphs draw as diagrams, laid out by mdpreview's own engine — no headless browser

Zero dependencies

"dependencies": {} — parser, layout, renderer, diagrams, and pixel font are all in this repo, on the Node stdlib alone. Safe on untrusted files: terminal-escape bytes are stripped at parse time.

Credits

  • Image rendering: in kitty/Ghostty and iTerm2/WezTerm the terminal draws the real pixels — mdpreview base64-wraps the bytes in the terminal's graphics protocol (kitty graphics, iTerm2 inline images) and the terminal decodes them. PNGs are decoded in-repo for the universal sextant cell-art fallback; under Bun, Bun.Image also transcodes JPEG/WebP → PNG for kitty (which is PNG-only) and decodes them for cell art — still zero npm dependencies.
  • Big-heading font: clR5×10 from the Schumacher "clean" bitmap family, © 1989 Dale Schumacher, freely redistributable. Embedded as generated bitmap data (tools/make-blockfont.ts), drawn as half-blocks with edge-collision kerning.
  • Example gallery (examples/gallery.md): artworks by Sargent, Hokusai, Van Gogh, Bruegel, and Dürer via The Met Open Access (CC0), plus NASA image library photos (public domain). Per-image credits inline in the file.

License

MIT