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-inspect-image

v1.0.1

Published

Pi extension that registers an inspect_image tool — analyzes local image files using a configurable vision-capable model via OpenAI-compatible API

Readme

pi-inspect-image

A pi extension that analyzes images using a separate vision-capable model — independent of your main chat model. This enables vision capabilities for non-vision models (e.g. Haiku, Sonnet) via tool calls to a selected vision model.

When to use it:

  • Your primary chat model doesn't support vision — route image analysis to a dedicated model.
  • You want to keep large image payloads out of your main conversation context — only the derived description enters your chat.
  • You need specialized image tasks: describing screenshots, extracting text via OCR, analyzing UI mockups, reading diagrams or charts, debugging visual layout issues, or inspecting error screenshots.
  • You're working with visual artifacts (designs, photos, graphs) and want pi to understand them before generating code.

Supported providers: OpenAI, OpenRouter, and any OpenAI-compatible API.

Setup

Run /setup-vision for a 2-step interactive configuration:

/setup-vision
  1. Pick a provider — auto-populated from providers you've authenticated via /login that have vision models.
  2. Enter the model ID — e.g. gpt-4o, openai/gpt-4o, or any model available on your provider.

The extension validates your entry against the model registry and warns if the model isn't recognized or lacks vision support (both are advisory — the call will still be attempted). Configuration is saved to .pi/settings.json.

You can also configure manually:

{
  "visionConfig": {
    "provider": "openai",
    "model": "gpt-4o"
  }
}
  • Project settings (.pi/settings.json) — shared with your team, set via /setup-vision.
  • Global settings (~/.pi/agent/settings.json) — personal, edit manually.

API keys

Configure via /login or set the appropriate environment variable:

| Provider | Env var | |----------|---------| | OpenAI | OPENAI_API_KEY | | OpenRouter | OPENROUTER_API_KEY | | Custom | Any — handled by /login or auth.json |

Configuration

| Field | Required | Description | |-------|----------|-------------| | provider | Yes | "openai", "openrouter", or any custom provider name | | model | Yes | Model ID (e.g. "gpt-4o", "openai/gpt-4o") | | baseUrl | No | Custom API base URL for compatible providers (auto-resolved for OpenAI/OpenRouter) | | maxTokens | No | Max tokens in response (default: 4096) |

Supported Image Formats

PNG, JPEG, GIF, WebP, BMP — up to 20 MB.

Usage

The extension registers an inspect_image tool. Once configured, ask pi to describe an image and it will use this tool automatically.

You can also pass a custom prompt to guide the analysis:

inspect_image("screenshot.png", "Extract all text visible in this image")

If no vision model is configured when the tool runs, you'll be guided through setup on the spot.

License

MIT