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-banana

v2.3.0

Published

Generate, edit, and analyze images in pi using Google Nano Banana (image gen) and Gemini Vision (analysis). Inline terminal preview, reference-image editing, auto-save.

Readme

pi-banana

pi-banana banner

Generate, edit, and analyze images directly inside pi using Google's Nano Banana 2 (gemini-3.1-flash-image-preview), Nano Banana Pro (gemini-3-pro-image-preview), and Gemini Vision.

  • Image Generation & Editing — Create images from scratch or pass referenceImages: ["./logo.png"] to edit existing pictures.
  • Multimodal Vision — Analyze, describe, or extract text from images using gemini-3.1-flash-lite (fast) or gemini-3.1-pro-preview (deep reasoning).
  • Inline preview in Kitty / iTerm2 / WezTerm — generated images show up right under the tool call.
  • Auto-save to ./generated/ so the agent and you both have a real file to refer back to.
  • One env varGOOGLE_API_KEY. Works with both AI Studio (AIza…) and Vertex AI Express (AQ.…) keys.

Install

pi install pi-banana

If pi doesn't resolve the bare name, use the explicit form: pi install npm:pi-banana.

Or for a single-session try:

pi -e pi-banana   # or: pi -e npm:pi-banana

Then export your key:

export GOOGLE_API_KEY="AIza…"   # AI Studio key, or
export GOOGLE_API_KEY="AQ.…"    # Vertex AI Express key

Get one at aistudio.google.com/apikey.

Usage

Just ask pi for what you want:

"Generate a 16:9 wallpaper of a foggy redwood forest at dawn"

"Edit ./generated/logo-20260508.png — make the background transparent"

"What color is the car in ./assets/photo.jpg?"

"Extract the text from these three receipts."

The model calls banana_image or banana_vision automatically.

Tools

1. banana_image

Renamed from generate_image in v2.0.1 to avoid colliding with @benvargas/pi-antigravity-image-gen. Both extensions can now coexist in the same pi install.

| Param | Type | Default | Description | |---|---|---|---| | prompt | string | — | Required. What to draw, or what to change about the reference image. | | aspectRatio | enum | 1:1 | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | | imageSize | enum | 1K | 1K, 2K, 4K. 4K requires quality=high. | | quality | enum | fast | fast = Nano Banana 2 (~3–10 s, cheapest). high = Nano Banana Pro (slower, top quality). | | referenceImages | array | — | Optional array of paths (PNG/JPEG/WebP/GIF) to edit or use for composition instead of generating from scratch. | | outputPath | string | ./generated/<slug>-<ts>.png | Optional output path. Parent dirs are created. |

2. banana_vision

| Param | Type | Default | Description | |---|---|---|---| | prompt | string | — | Required. What you want to know about the image(s) (e.g. 'Describe this image', 'Extract the text'). | | imagePaths | array | — | Required. Array of paths to existing images to analyze. | | quality | enum | fast | fast = gemini-3.1-flash-lite (fast/cheap). high = gemini-3.1-pro-preview (slower, deep reasoning). |

Configuration

Two env vars adjust defaults without touching tool parameters:

| Env var | Default | Effect | |---|---|---| | PI_IMAGE_DIR | generated | Default save directory (relative paths resolve against cwd). | | PI_IMAGE_QUALITY | fast | Default quality if the model doesn't pass one. |

How is this different from @benvargas/pi-antigravity-image-gen?

| | pi-banana | @benvargas | |---|---|---| | Auth | GOOGLE_API_KEY env var | OAuth via Antigravity (pi /login) | | Models | Flash + Pro | Pro only | | Image edit (input picture) | ✅ | ❌ | | Auto-save default | ✅ to ./generated/ | ❌ disabled by default | | Aspect ratios | 10 | 10 | | Inline terminal preview | ✅ | ✅ |

If you have an Antigravity OAuth setup and want quota tracking, benvargas is great. If you just want to drop in an API key and start making pictures, this one is simpler.

From the same author

By Francesco Frapporti at Fornace.

  • pi-bench — LLM benchmark toolkit for pi. Probes every available model to find the fastest and cheapest. All package banners in this ecosystem were created with pi-banana.
  • pi-recap — Always-visible session recap panel for pi. Never scroll back to remember what you were doing.
  • pi-alibaba-models — Complete Alibaba provider for pi: Qwen, DeepSeek, Kimi, GLM, MiniMax with native thinking levels.
  • pi-notte-theme — Notte: a true-dark pi theme where darkness has color and text glows like terminal phosphor.

Development

npm install
npm run typecheck             # tsc --noEmit
GOOGLE_API_KEY=… npm run smoke  # full live-API smoke test in _tmp/

License

MIT