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

mdpix

v0.1.2

Published

Render any Markdown file into dense PNG image pages plus a text factsheet, for token-efficient LLM context injection.

Readme

mdpix

Render any Markdown file into dense PNG image pages plus a text factsheet, for token-efficient LLM context injection — the same idea as pxpipe, applied to a single .md file instead of a live API proxy.

Dense text (code fences, tables) packs more characters per image-token than per text-token on vision-capable models. mdpix reflows the token-heavy parts of a Markdown file into fixed-width character grids, rasterizes them as PNG pages, and writes an adjacent factsheet with exact-value strings (hashes, UUIDs, URLs, numeric IDs) that vision models are prone to misreading.

Install

npm install -g mdpix

CLI usage

mdpix <file.md> [--out dir] [--profile claude|gpt|grok] [--text-mode auto|all|none]
  • --out — output directory (default mdpix-out)
  • --profile — page dimensions/font metrics tuned per target model (default claude)
  • --text-mode
    • auto (default) — only dense blocks (code fences, tables, long paragraphs) are imaged; short prose stays out of the image pages
    • all — the entire file is imaged
    • none — no images are produced (only the factsheet/manifest)

Output directory contains:

  • page-001.png, page-002.png, … — rendered pages
  • factsheet.txt — extracted exact-value strings (only written if any were found)
  • manifest.json — page count, profile used, truncation flag

Library usage

import { renderMarkdownFile } from "mdpix";

const result = await renderMarkdownFile("docs/spec.md", {
  outDir: "out",
  profile: "claude",
  textMode: "auto",
});

Lower-level primitives are also exported: renderTextToImages, segmentMarkdown, buildFactsheet.

Config file

Drop an mdpix.config.json in your project root (or an "mdpix" field in package.json) to set defaults:

{
  "profile": "claude",
  "outDir": "mdpix-out",
  "textMode": "auto"
}

CLI flags always override the config file.

Profiles

| profile | page size | intended target | | --- | --- | --- | | claude | 1568×728 | Claude family (default) | | gpt | 768×1600 | GPT vision models | | grok | 912×512 | Grok vision models |

Known limitations

Vision models are not OCR. Byte-exact values (hashes, IDs, secrets, precise numbers) can be misread from a rendered page — this is why mdpix pulls those into a separate text factsheet.txt rather than trusting the image alone. Don't rely on image pages for content where a single wrong character matters and no factsheet entry covers it.

The default renderer uses the system "monospace" font via @napi-rs/canvas, which is Latin-glyph-only in this build. Non-Latin content (CJK, Arabic, emoji, etc.) will render as missing/fallback glyphs rather than legible text. If your Markdown contains meaningful non-Latin content, either keep it out of the imaged portion (--text-mode auto, and rely on the surrounding text prompt) or bundle a CJK/emoji-capable font via @napi-rs/canvas's GlobalFonts.registerFromPath before calling the library API — this is not yet wired into the CLI.

License

MIT