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

web2md-cli

v1.0.0

Published

Convert any URL to clean Markdown — works with Reddit, YouTube, arXiv, GitHub and more

Readme

web2md

Convert any URL to clean Markdown — from the command line.

Zero install. Works with Wikipedia, arXiv, Hacker News, GitHub, dev.to, Substack, and more. For Reddit and restricted sites, use an API key.

Usage

npx web2md <url>

Examples

# Basic conversion
npx web2md https://arxiv.org/abs/2501.12345

# Pipe to an LLM
npx web2md https://news.ycombinator.com/item?id=123 | llm "summarize"

# Save to file
npx web2md https://example.com -o article.md

# Add YAML frontmatter
npx web2md https://example.com --meta

# JSON output (pipe to jq)
npx web2md https://example.com --json | jq '.metadata.wordCount'

# Batch from file
cat urls.txt | xargs npx web2md

# Reddit (requires API key)
WEB2MD_API_KEY=w2m_xxx npx web2md 'https://reddit.com/r/programming/comments/xxx'

Options

| Option | Description | |--------|-------------| | --no-images | Strip image references | | --no-links | Strip hyperlinks | | --meta | Add YAML frontmatter (title, source, wordCount) | | --json | Output as { markdown, metadata } JSON | | -o, --output | Write to file instead of stdout | | -q, --quiet | Suppress progress messages | | --version | Print version | | -h, --help | Show help |

Environment Variables

| Variable | Description | |----------|-------------| | WEB2MD_API_KEY | API key (w2m_xxx) — enables Reddit + server-side rendering | | WEB2MD_API_URL | Override API base URL |

How it works

Without API key (default): Fetches the URL locally and converts HTML to Markdown using the same extraction engine as the Web2MD Chrome extension. Fast, no rate limits.

With API key: Routes through the Web2MD server, which handles Reddit (bypasses IP blocks), Fandom/Wikia via MediaWiki API, and other restricted sites.

Get an API key at web2md.org/dashboard/api-keys

Supported Sites

Works on any HTML page. Optimized extraction for:

  • Wikipedia, arXiv, MDN
  • Hacker News (with comments)
  • GitHub Issues / PRs
  • Stack Overflow
  • dev.to, Medium, Substack
  • OpenAI Docs, Mintlify-based docs
  • Reddit (requires API key)

For AI Agents (Claude Code, Cursor, etc.)

Add to your CLAUDE.md or project instructions:

Use `npx web2md <url>` to fetch web pages as clean Markdown.
Supports arXiv, Wikipedia, HN, GitHub, dev.to, Substack.
For Reddit: WEB2MD_API_KEY=w2m_xxx npx web2md <url>
Output goes to stdout, errors to stderr.

License

MIT