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

pi-web-md

v1.0.0

Published

Secure, keyless web search and Markdown-first page fetching for the Pi coding agent.

Readme

pi-web-md

Secure, keyless web search and Markdown-first page fetching for the Pi coding agent.

It gives Pi three tools:

| Tool | Purpose | | --- | --- | | web_search | Search the public web with keyless providers | | web_fetch | Fetch one public URL as clean Markdown | | batch_web_fetch | Fetch up to ten URLs concurrently |

Install

pi install npm:pi-web-md

Also valid:

pi install git:github.com/dodo-reach/pi-web-md
pi install https://github.com/dodo-reach/pi-web-md
pi install /path/to/pi-web-md
pi -e git:github.com/dodo-reach/pi-web-md

After install, restart Pi or run /reload.

Usage

Ask Pi to use the tools, or call them directly:

web_search({ query: "Node.js fetch documentation", max_results: 5 })
web_fetch({ url: "https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API" })
web_fetch({ url: "https://example.com/docs", selector: "main", focus: "installation" })
batch_web_fetch({ requests: [{ url: "https://example.com" }, { url: "https://example.org" }] })

web_fetch requests native Markdown first. When a server returns HTML, it uses Readability and Turndown with GFM support. Relative links become absolute by default. Large output is saved to a temporary Markdown file instead of filling the model context.

Search uses keyless Exa with DuckDuckGo and Bing fallbacks. No account or API key is required. Keyless providers can apply rate limits or request bot verification, so search availability is not guaranteed.

Fetch options

  • selector: extract all matching HTML elements before conversion
  • focus: return the most relevant Markdown section or text window
  • abs_links: make relative links and images absolute; default true
  • output_mode: auto, inline, or file
  • timeout_ms: total timeout, including DNS

Batch requests accept the same URL, selector, focus, link, output, and timeout options. The batch tool preserves request order and limits concurrency.

Security and limits

  • Allows only public HTTP and HTTPS URLs
  • Blocks loopback, private, link-local, metadata, reserved, mapped IPv4, and NAT64 private targets
  • Revalidates every redirect and DNS lookup
  • Rejects embedded URL credentials
  • Limits redirects to five
  • Limits each response to 10 MB while streaming
  • Rejects PDFs, images, and binary responses
  • Applies one total request timeout

This package performs static HTTP fetching. It does not execute JavaScript, open authenticated pages, bypass paywalls, or solve anti-bot challenges.

Independent benchmarks

Reproduction scripts and full results are in benchmarks/README.md.

Highlights from public human-annotated datasets:

  • WCXB: 0 extraction errors across 2,008 pages
  • WCXB rendered-text F1: 0.7426 development, 0.7951 test
  • WebMainBench 545 no-LLM overall: 0.4156
  • Mean extraction time: 20–31 ms/page on the recorded Apple M4 test system

The benchmark results are local reproducible runs, not official leaderboard placements. Dataset commits, normalization, hardware, and limitations are reported with the results.

Package layout

pi-web-md/
├── extensions/
│   └── web-md.ts
├── src/
├── test/
├── benchmarks/
├── package.json
├── README.md
└── LICENSE

Development

npm install
npm test
npm run typecheck
npm run pack:check

Requirements

  • Node.js 20 or later
  • Pi coding agent with extension support
  • Public network access for live search and fetch

Credits

Adapted from @mrclrchtr/supi-web (MIT). Search and safe-fetch behavior also use ideas from @bytetrue/pi-web-search (MIT). See THIRD_PARTY_NOTICES.md for license notices.

License

MIT