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

agent-web-md

v0.2.1

Published

Build-time markdown generator for agent-friendly static site content

Readme

agent-md

agent-md is a build-time Markdown generator for publishing agent-friendly static .md pages from your website content.

It is not a runtime proxy or middleware. It runs during CI/deploy and writes files you host directly.

Quickstart

npm install --save-dev agent-web-md
npx agent-md build --sitemap https://example.com/sitemap.xml --out public/agent

After package and dependencies installation, add commands to your build - E.g:

"build": "next build && agent-md build --urls urls.txt --out public/agent"

Explicitly specify --renderer static
"build:agent": "agent-md build --urls urls.txt --out public/agent --renderer static" 

Package name on npm: agent-web-md
CLI command exposed by the package: agent-md

Generated output is available at paths like:

  • public/agent/docs/getting-started.md
  • public/agent/index.json

If your static files are deployed from public/, those become:

  • https://website.com/agent/docs/getting-started.md
  • https://website.com/agent/index.json

Agent discovery entrypoint is https://website.com/agent/index.json. Agents can read that manifest first, then follow each markdown_path.

CLI

npx agent-md build --sitemap <url> --out <dir>
npx agent-md build --urls urls.txt --out <dir>

Flags:

  • --sitemap <url>: sitemap URL input
  • --urls <file>: line-separated URL file input
  • --out <dir>: output directory (default: public/agent)
  • --base-url <url>: optional base URL for relative link/image rewriting
  • --max-pages <n>: optional page cap for testing
  • --renderer static|playwright: renderer mode (default: static)
  • --timeout <ms>: request/page timeout
  • --concurrency <n>: concurrent page workers (default: 3)
  • --extra-wait-ms <ms>: extra wait after domcontentloaded before extraction (default: 1000; playwright only)
  • --skip-robots-check: skip robots.txt enforcement for URL crawling

Choosing a renderer

| Renderer | When to use | |---|---| | static (default) | Server-rendered, pre-rendered, or static HTML sites. Fast, no browser required. | | playwright | JS-heavy SPAs or pages that hydrate content client-side. Requires: npx playwright install chromium |

Note: for large sites, prefer --sitemap (including sitemap index and .xml.gz sitemap files). Use --urls as a manual fallback.

Before using --sitemap, sanity-check the URL:

curl -sSI -L https://your-domain.com/sitemap.xml
curl -sSL https://your-domain.com/sitemap.xml | head -n 40

You should see:

  • HTTP 200
  • XML containing <urlset> or <sitemapindex>

If you get HTML/404, that endpoint is not a sitemap for agent-md.

What it generates

For each source URL, agent-md writes:

  1. Markdown file with YAML frontmatter
  2. index.json manifest for discovery

Use /agent/index.json as the discovery URL you can share publicly for agents.

Changelog

See CHANGELOG.md for release history.