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

@dmallory42/pi-read-url

v0.1.2

Published

Pi extension for extracting public HTML page URLs into clean markdown via system curl.

Downloads

49

Readme

@dmallory42/pi-read-url

A small pi extension that adds a read_url tool for turning public HTML page URLs into clean, readable markdown using the machine's system curl.

Fast, local, and lightweight — built for content extraction, not browser automation.

What it does

  • fetches public HTML page URLs via the user's system curl
  • extracts the main readable content with Mozilla Readability
  • converts extracted HTML to markdown with Turndown
  • keeps output compact by default to save tokens
  • supports maxChars for even smaller extracts
  • optionally includes metadata like site name, byline, excerpt, and HTTP status
  • rejects obvious non-page URLs like PDFs, media files, and common downloads
  • returns friendlier errors for DNS issues, blocked pages, timeouts, and unsupported content types

Install

From npm

pi install npm:@dmallory42/pi-read-url

From git

pi install git:github.com/dmallory42/pi-read-url

Then reload pi:

/reload

Usage

Ask pi naturally:

Read https://example.com
Use read_url to extract the main content from https://example.com
Use read_url on https://example.com with maxChars 4000
Use read_url on https://example.com and includeMetadata true
Use read_url on https://example.com and focus on the author bio

Tool behavior

read_url is built for extracting content from public HTML pages by URL.

It works best for:

  • blogs
  • docs
  • static content pages
  • article-like HTML pages

It is not intended for:

  • PDFs or office documents
  • images, media, and downloadable files
  • login-gated pages
  • JS-heavy SPAs
  • aggressively bot-protected sites
  • interactive browsing tasks like clicking, login flows, or form submission

Parameters

url

The HTTP(S) page URL to fetch.

objective

An optional focus hint to help frame what the caller cares about in the returned extract.

maxChars

Optional character cap for the returned markdown. Useful when you want to save tokens.

includeMetadata

Optional boolean. When enabled, the output also includes metadata like HTTP status, site name, byline, and excerpt.

Why

Sometimes you just want the content of a page URL in a form the model can use:

  • without sending it through a third-party fetch service
  • without hand-rolling curl | grep | sed pipelines
  • without jumping to a full browser automation stack

Development

Typecheck:

npm run typecheck

Run the local smoke test:

npm test

Release notes and workflow live in RELEASING.md.

License

MIT