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

@siddr/pi-web-search

v0.1.6

Published

Brave web search tool extension for pi

Readme

Web Search (Brave) Extension

Adds a web_search tool backed by the Brave Search API. Results include titles, URLs, snippets, and age when available. This extension does not fetch page content.

Setup (recommended)

  1. Get an API key from https://api-dashboard.search.brave.com.
  2. In pi, run:
/web-search-setup

Paste your primary API key when prompted. You can optionally add a fallback key (used when the primary key hits rate limits).

Setup commands

  • /web-search-setup — prompts for primary key, then optional fallback
  • /web-search-setup primary — set/replace primary only
  • /web-search-setup fallback — set/replace fallback only

Advanced setup (manual secrets)

You can also set keys directly in ~/.pi/agent/auth.json:

{
  "brave-search": { "type": "api_key", "key": "PRIMARY_KEY" },
  "brave-search-fallback": { "type": "api_key", "key": "FALLBACK_KEY" }
}

If auth.json already has entries, merge these keys instead of overwriting the file.

Install

pi install npm:@siddr/pi-web-search

Tool

web_search

Parameters:

  • query (string) — single search query
  • queries (string[]) — multiple search queries
  • count (number, optional) — results per query (max 20)

Defaults:

  • Single query: count = 10
  • Multiple queries: count = 5 unless overridden

Behavior:

  • Multiple queries return grouped results per query.
  • Use Ctrl+O to expand tool output and show snippets.
  • Output is truncated to 2000 lines or 50KB. When truncated, the full output is saved to a temp file and its path is included in the tool output.

Example prompts

Search for "brave search api" and summarize the top results.
Search for the following: queries=["pi coding agent extensions", "brave search api pricing"].
Search for "rust async runtime" with count=8.