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

@heyhuynhgiabuu/pi-search

v0.2.4

Published

Research tools for the Pi coding agent: websearch, codesearch, context7, deepwiki, web_fetch.

Downloads

480

Readme

@heyhuynhgiabuu/pi-search

Version CI Versioning License: MIT

Five research tools for the Pi coding agent: websearch, codesearch, context7, deepwiki, web_fetch.

  • Zero-config by default — works with no API key via the Exa MCP server
  • Full feature access when configured — set EXA_API_KEY to unlock searchType: deep, recencyFilter, domainFilter, highlights etc. via direct REST
  • Disable any tool you don't need via disabledTools config
  • Coded errors for reliable model reasoning on failure
  • Streaming progress for multi-query research

Install

pi install npm:@heyhuynhgiabuu/pi-search

That's it. No API key required.

Tools

| Tool | Purpose | When to use | | --- | --- | --- | | websearch | Search the open web | Default research tool. recencyFilter: "day" for sitreps. domainFilter: ["reuters.com", "-reddit.com"] to shape source set. searchType: "deep" for thorough coverage. | | codesearch | Code/library search | Looking for API references, library patterns, implementation examples. | | context7 | Up-to-date library docs | Fetch current documentation for a library: libraryName: "react", topic: "hooks". | | deepwiki | Ask about a public GitHub repo | repo: "facebook/react", question: "How does the reconciler work?". | | web_fetch | Extract full text from a URL | Follow-up after websearch to read the best articles. |

Configuration

Optional. Create ~/.pi/pi-search.json:

{
  "exaApiKey": "your-exa-api-key",
  "disabledTools": ["codesearch"],
  "mcpTimeoutMs": 30000
}

Or set environment variables:

export EXA_API_KEY=your-key
export PI_SEARCH_DISABLED_TOOLS=codesearch,deepwiki
export PI_SEARCH_USE_REST=true        # force direct REST (default: false; auto-enabled when EXA_API_KEY is set)
export PI_SEARCH_CONFIG_PATH=/path/to/config.json

Resolution order (highest priority first):

  1. environment variables
  2. ~/.pi/pi-search.json (or PI_SEARCH_CONFIG_PATH)
  3. defaults

Direct REST vs MCP

websearch and codesearch choose their provider at execution time:

  • If EXA_API_KEY is set (or PI_SEARCH_USE_REST=true), they call https://api.exa.ai/search directly. This unlocks the full Exa feature surface.
  • Otherwise they fall back to https://mcp.exa.ai/mcp (the public MCP server, no key required). Feature set is narrower.

context7, deepwiki, and web_fetch always use their respective providers regardless.

Architecture

src/
├── index.ts          # extension entrypoint, wires the 5 tools
├── config.ts         # env + ~/.pi/pi-search.json resolution
├── errors.ts         # coded errors (validation_error, mcp_error, …)
├── types.ts          # shared types
├── mcp/client.ts     # JSON-RPC 2.0 MCP client
├── exa/client.ts     # direct REST client for api.exa.ai
├── exa/params.ts     # parameter normalization
└── tools/            # one file per tool + shared citations.ts

See AGENTS.md for the change map.

Development

make install        # npm ci
make check          # biome + tsc + vitest --coverage
make test           # vitest
make build          # tsc → dist/
make format         # biome format --write .
make lint           # biome lint
make typecheck      # tsc --noEmit
make release-dry-run
make version-packages
make release

License

MIT