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-search-tools

v1.0.2

Published

Unified web search extension for Pi — Tavily, Exa, and Anysearch behind a single smart tool.

Readme

Pi Search Tools

中文版

Unified web search and content extraction extension for Pi.


Project Structure

pi-search-tools/
├── index.ts                           # Pi extension entry point (re-exports src/index.ts)
├── src/
│   ├── index.ts                       # Extension registration logic
│   ├── config.ts                      # Configuration file parser and resolver (~/.pi/pi-search-tools/config.json)
│   ├── commands.ts                    # Stateful loop-controlled /search-config command
│   ├── router.ts                      # Intent classifier and multi-provider priority router
│   ├── utils.ts                       # Pure result deduplication core algorithm
│   ├── web-search.ts                  # web_search tool with multi-angle queries dispatcher
│   ├── web-fetch.ts                   # web_fetch tool with SSRF protection
│   └── providers/                     # REST API clients for search providers
│       ├── index.ts                   # Providers metadata and factory
│       ├── types.ts                   # Unified types (SearchResult, SearchProvider)
│       ├── tavily.ts                  # Tavily API adapter (supports search, crawl, and research)
│       ├── exa.ts                     # Exa API adapter (highly time-sensitive results)
│       ├── anysearch.ts               # Anysearch API adapter (structured vertical searches)
│       ├── serper.ts                  # Serper (Google Search) API adapter
│       └── jina.ts                    # Jina Reader API adapter
├── test/                              # Native TypeScript unit tests
│   ├── security.test.ts               # SSRF and loopback address blocker tests
│   ├── router.test.ts                 # Intent classifier and router decision tests
│   ├── config.test.ts                 # API key masking and resolving priority tests
│   └── dedup.test.ts                  # URL deduplication pure logic tests
├── skills/                            # Pi Coding Agent strategies guidelines
│   └── search/
│       └── SKILL.md                   # Skill routing manual for LLMs
└── package.json

Installation

pi install npm:pi-search-tools

Configuration & Usage

Interactive TUI Control Panel

Run the interactive configuration command:

/search-config

Use the back/cancel key inside the input box to safely return to the provider list.

Environment Variables

Add provider API keys to your environment (takes precedence over configuration files):

  • TAVILY_API_KEY
  • EXA_API_KEY
  • ANYSEARCH_API_KEY
  • SERPER_API_KEY
  • JINA_API_KEY

Testing

Run the native TypeScript unit test suite (Node.js native test runner):

npm run test

Security & Protections

To ensure corporate-grade sandbox safety, pi-search-tools is equipped with robust SSRF (Server-Side Request Forgery) protection:

  1. SSRF Blocker: Prevents requests to localhost, loopback addresses (127.0.1.1, ::1), link-local addresses (169.254.0.0/16), and private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
  2. DNS Rebinding Protection: Resolves target hostnames asynchronously to verify resolved IPs BEFORE executing HTTP requests, mitigating DNS rebinding vulnerabilities.

Development

We align with the code quality and security standards of the primary pi-main workspace:

  1. Linter & Formatter: Biome is configured to auto-format and check codebase. We use tab indentation with a width of 3 characters.
  2. Commands:
    • Check format and Lint: npm run check
    • Run tests: npm test

License

MIT