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

@pokutuna/pi-google-genai

v0.2.0

Published

Pi extension that adds Google GenAI grounding tools: google_search, google_maps, url_context, and deep_research.

Readme

@pokutuna/pi-google-genai

A pi extension that adds Google GenAI grounding tools, built on the official @google/genai SDK.

Tools

| Tool | What it does | | ---------------- | ---------------------------------------------------------------- | | google_search | Search-grounded question answering via Google Search | | google_maps | Maps-grounded answers (places, nearby, routes, local businesses) | | url_context | Ask Gemini a question using specific http/https URLs as context | | deep_research | Agentic multi-step research via Gemini Deep Research (Vertex AI only) |

Grounding tools return the model's synthesized answer plus a Sources: section. Long outputs are truncated; the full raw response is saved to a session-scoped temp file.

google_search accepts an optional searchTypes array ("web_search" and/or "image_search"). Some models do not support image search grounding.

deep_research starts Gemini's Deep Research agent and returns an interactionId; it typically takes several minutes to finish. Use the ID without query to check its status. It is available only with Vertex AI. Its answer keeps the agent's own [cite: N] markers and ends with a Sources: list of every page it cited, as [N] title — url under those same numbers — so [cite: 6] in the text points at [6] in the list.

Default model: gemini-3.6-flash; Vertex AI location defaults to global.

Authentication

Gemini Developer API (API key)

Use either of these environment variables:

export GEMINI_API_KEY=your-key      # or GOOGLE_API_KEY

Alternatively, set apiKey in the config file. Pi's /login google credential is used when lookupPiConfig is true.

Vertex AI (Application Default Credentials)

Vertex AI authentication uses Application Default Credentials (ADC). For local development, authenticate with:

gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=my-gcp-project
# optional, defaults to "global"
export GOOGLE_CLOUD_LOCATION=us-central1

See the Application Default Credentials documentation for other setup options. This is also the required backend for deep_research.

Set GOOGLE_GENAI_USE_VERTEXAI=true or "auth": "vertex-ai" to force Vertex AI. Otherwise, an API key takes precedence when both are available.

Configuration

Optional JSON file: ~/.pi/agent/google-genai.json (or $PI_CODING_AGENT_DIR/google-genai.json if set).

{
  "auth": "vertex-ai",
  "project": "my-gcp-project",
  "model": "gemini-3.6-flash",
  "lookupPiConfig": false
}

Config values override environment variables. Unknown or invalid fields produce warnings. apiKey must be a literal value; $ENV_VAR and command interpolation are not supported.

To enable lookup of pi's Google configuration, use:

{
  "lookupPiConfig": true
}

Pi configuration lookup

lookupPiConfig defaults to false; the extension then uses only its own settings and environment variables. Set it to true to use pi's current Google provider and credentials:

  • current provider google-vertex uses Vertex AI;
  • pi's google / google-vertex credentials, including GOOGLE_CLOUD_API_KEY, are used when available;
  • otherwise Gemini API authentication is preferred over Vertex AI authentication (so a current google provider resolves to its API key too).

Explicit settings in google-genai.json still take precedence.

Command

  • /google-genai or /google-genai status — show the resolved configuration (never the key itself) and any warnings.
  • /google-genai help — usage and configuration instructions.