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

v0.1.1

Published

Web search & research tools for the Pi coding agent, backed by the Gemini API with Google Search grounding — keeps raw page noise out of your context.

Readme

pi-gemini-search

npm version License: MIT

Web search & research tools for the Pi coding agent, backed by the Gemini API with Google Search grounding. The agent can call them autonomously to pull fresh information from the web — without dumping raw page contents into your conversation.

The key idea: search context stays inside the tool result. Gemini does the searching and reading, then returns only a synthesized answer plus source URLs, so your main context stays lean. No headless browser, no page-scraping noise.

Tools

Registers two tools the model can call:

  • web_search — quick fact-check / verification. Returns a concise synthesized answer (a few sentences) + source URLs. Use for version numbers, dates, single facts, a quick second opinion. Uses url_context too, so you can hand it URLs to cross-check.
  • web_research — in-depth research on a complex topic. Returns a thorough, structured answer + source URLs. Use for multi-faceted topics, how-tos, architecture opinions, grounded second opinions.

Both tools:

  • Ground answers with Google Search (never answer from memory alone).
  • Can read specific URLs you pass via the Gemini url_context tool — include background, constraints, prior conclusions, docs URLs in the query; more context = better answer.
  • Resolve Gemini's vertexaisearch.cloud.google.com redirect links to their pure destination URLs (via the 302 location header) so only clean links enter your context.

API key

The extension needs a Gemini API key. Resolution order:

  1. GEMINI_API_KEY environment variable
  2. ~/.pi/agent/auth.json with a gemini entry:
    { "gemini": { "key": "..." } }

Get a key from Google AI Studio.

Install

pi install npm:pi-gemini-search

Or from GitHub:

pi install git:github.com/nilskluewer/pi-gemini-search
# or pin a version:
pi install git:github.com/nilskluewer/[email protected]

Try without installing:

pi -e git:github.com/nilskluewer/pi-gemini-search

How it differs from just using curl

You already have bash + curl. This package is for when you don't have a specific URL, or want a synthesized answer rather than a verbatim page dump:

  • Quick fact / no URL / broad researchweb_search / web_research (synthesized, lean, lossy).
  • Specific doc page you need verbatim → fetch the .md with curl (full fidelity). Many Mintlify-hosted docs serve clean Markdown when you append .md to the URL.

License

MIT