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

readme-preview

v1.0.2

Published

Preview and validate how your README renders on npm and GitHub before publishing.

Readme

readme-preview

Preview, validate, and prepare your README for npm and GitHub before publishing.

readme-preview helps you:

  • 👀 Preview how Markdown renders
  • 🧹 Rewrite relative assets & links to working raw URLs
  • Lint & validate README quality (CI-ready)
  • Bootstrap docs & CI with a single init command

Designed to be tiny, fast, and zero-config.


Install

No install required:

npx readme-preview

Or add as a dev dependency:

npm i -D readme-preview

Quick Start

Preview your README in a browser:

npx readme-preview

Run CI-style validation:

npx readme-preview check --strict

Bootstrap README badges + GitHub Action:

npx readme-preview init --assets

Commands

preview (default)

Render README in a local browser preview.

npx readme-preview

Options:

--file <path>        Markdown file (default: README.md)
--port <number>      Preview port (default: 4173)
--no-open            Do not open browser
--theme <npm|github> Visual theme (default: npm)
--branch <name>      Git branch for raw URLs (default: HEAD)
--base-url <url>     Override raw base URL
--rewrite-links      Rewrite relative markdown links

Examples

Preview a docs README:

npx readme-preview --file docs/README.md

Use GitHub theme:

npx readme-preview --theme github

Rewrite links + images using main branch:

npx readme-preview --branch main --rewrite-links

Preview GitLab repo:

npx readme-preview --base-url https://gitlab.com/user/repo/-/raw/main/

build

Generate static HTML preview:

npx readme-preview build

Output:

.readme-preview/index.html

Useful for:

  • CI artifacts\
  • documentation previews\
  • static hosting

check

Run README validation rules.

npx readme-preview check

Exit code:

  • 0 → pass\
  • 1 → issues found

Strict mode

npx readme-preview check --strict

Strict checks include:

  • Missing H1 title
  • Relative images
  • README too short
  • Missing code blocks
  • Missing description under H1
  • Raw HTML usage
  • Missing Install section
  • Missing Usage section

Perfect for CI enforcement.


init

Bootstrap README quality setup.

npx readme-preview init

Creates or updates:

  • GitHub Action workflow\
  • README badges section\
  • Screenshot section\
  • Quick start examples

Options

--assets           Add placeholder screenshot
--workflow-only    Only create GitHub Action
--readme-only      Only patch README
--force            Overwrite existing files
--workflow-name    Custom workflow name

Examples

Full setup:

npx readme-preview init --assets

Only CI workflow:

npx readme-preview init --workflow-only

Overwrite existing:

npx readme-preview init --force

Asset & Link Rewriting

Relative paths like:

![Demo](./assets/demo.png)
[Guide](./docs/guide.md)

Can be rewritten to:

https://raw.githubusercontent.com/user/repo/HEAD/assets/demo.png
https://raw.githubusercontent.com/user/repo/HEAD/docs/guide.md

Controlled by:

--branch
--base-url
--rewrite-links

Works with:

  • GitHub\
  • GitLab\
  • Self-hosted repos

Themes

Switch rendering style:

--theme npm
--theme github

Useful for matching:

  • npm package page\
  • GitHub README view

CI Integration

Typical GitHub Action step:

- name: README checks
  run: npx readme-preview check --strict

This ensures:

  • Broken docs never reach main
  • README quality stays high
  • Contributors follow standards automatically

Why use readme-preview?

Most projects discover README problems after publishing.

This tool lets you:

  • Catch rendering issues before npm release
  • Enforce documentation quality in CI
  • Provide working screenshots & links
  • Bootstrap professional README structure instantly

All in a tiny CLI with no config .


Philosophy

Small tools.
Real problems.
Zero friction.


License

MIT