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

@clement_chsn/pi-web

v0.2.0

Published

Brave web search, local reading of pages, PDFs, images and GitHub URLs, and versioned Context7 documentation for Pi.

Readme

Web

Web tools for the agent, independent of your AI provider: Brave search, reading of pages, PDFs, images and GitHub URLs, and versioned library documentation from Context7.

pi install npm:@clement_chsn/pi-web

| Tool | Purpose | Key | | --- | --- | --- | | web_search | Search the web with Brave: titles, URLs, snippets | BRAVE_API_KEY | | web_fetch | Read a public URL: page as Markdown (HTML, text, Markdown, JSON), PDF text, image, or GitHub repository, directory, file, issue or pull request | None | | context7_resolve | Find a library's Context7 ID and its indexed versions | CONTEXT7_API_KEY | | context7_docs | Read documentation excerpts with their sources | CONTEXT7_API_KEY |

API keys

Put your keys in ~/.config/pi-extensions/.env, a private file outside any repository:

mkdir -p ~/.config/pi-extensions
touch ~/.config/pi-extensions/.env && chmod 600 ~/.config/pi-extensions/.env

Then add the keys with an editor, so they stay out of your shell history:

BRAVE_API_KEY=your_brave_key
CONTEXT7_API_KEY=your_context7_key
  • Brave: create a key for the Search plan on the Brave Search API. The extension sets no spending cap: check the credits, quotas and limits of your Brave account.
  • Context7: create a key from the Context7 dashboard. Check the current quotas on its plans page.

The file is reread on every call, so a new key needs no restart. Environment variables of the same name take precedence, even when empty. Only this file is read, never a project's .env.

Behavior and limits

  • Brave and Context7: one request per call, with no automatic retry, prefetching or cache, so a Context7 resolve followed by a read costs two calls of your quota.
  • web_fetch reads public HTTP(S) URLs only: no localhost or private network, no login or cookies, and no JavaScript execution, so a page that needs it may come back empty or partial. It allows 4 redirects, 20 seconds and 4 MiB per URL, 20 MiB for a PDF; the several GitHub API requests behind one URL, and a fallback to the ordinary page, share these limits.
  • PDF: the text is extracted locally with unpdf and marked by page, in a worker thread limited to 20 seconds and 512 MB of heap that stops when the call is cancelled. There is no OCR: a scanned PDF, or one whose fonts cannot be decoded, is reported as having no text, and a password-protected PDF is refused.
  • Images: PNG, JPEG, GIF and WebP reach the model as images when the current model accepts them; Pi resizes them before sending. The format comes from the file's signature, not the declared type; an image Pi cannot decode, such as a truncated file, and other formats are refused.
  • GitHub: a repository gives its README and root files (a github.com path that is not a repository, such as an advisory, is read as an ordinary page), a tree URL lists that directory, a blob URL reads the raw file, and an issue or pull request gives its description and first 100 comments, without inline review comments. GitHub's API allows 60 requests per hour without a token: a repository costs 2, an issue or pull request 1 or 2. Private repositories, and branch names containing / in tree URLs, are not supported: the agent is told to use gh or git through the shell instead.
  • Long results are cut at 24,000 bytes or 600 lines. The full text is saved in a private temporary file (pi-web-*/source.txt) the agent can read; delete these files when you no longer need them.
  • Privacy: search queries go to Brave and documentation queries to Context7. Never put secrets, proprietary code or personal data in them. Your keys are only sent to their own service.
  • Trust: pages, snippets and documentation are untrusted data. The agent is told to cite sources and not follow instructions found in them, but this is no guarantee against prompt injection.