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

@capyup/pi-codex-image

v0.2.2

Published

Pi package that exposes Codex-style image_generation and view_image tools with dynamic model routing.

Readme

pi-codex-image

Contributes the image portion of IgorWarzocha/pi-codex-conversion as a focused Pi package. Current release version: 0.2.2.

This package ports the Codex-style image_generation and view_image capabilities without replacing Pi's full tool surface.

It provides:

  • Extension tool: image_generation
  • Extension tool: view_image
  • Skill: image-generation

Behavior

pi-codex-image dynamically routes tools based on the currently selected model:

  • image_generation is active only when the current provider is openai-codex and the selected model advertises image input support.
  • view_image is active for any selected model that advertises image input support.
  • Switching models triggers the router again, adding these tools when supported and removing them when unsupported.
  • Existing non-image active tools are preserved while image tools are added or removed.

Native image generation

The image_generation tool mirrors pi-codex-conversion's native-tool approach:

  1. The agent sees a function-style tool named image_generation.
  2. Before the provider request is sent, the extension rewrites that function tool into the OpenAI Codex Responses native tool:
{ "type": "image_generation", "output_format": "png" }
  1. The local function body is intentionally not used; if it executes locally, it throws an explanatory error.

Generated image handling is therefore delegated to the active OpenAI Codex Responses provider, matching the referenced adapter's routing semantics.

View images

view_image wraps Pi's native image reader and returns only image content to the model.

Parameters:

{
  "path": "./local-image.png",
  "detail": "original"
}
  • path is required and may be absolute or relative to the current working directory.
  • detail: "original" is exposed only for Codex-family image-capable models.
  • file_path and image_path are accepted as compatibility aliases and normalized to path.

Install

From a checkout:

pi install npm:@capyup/pi-codex-image

For one session:

pi -e /path/to/pi-codex-image

Run /reload after installing into an active session.

Development

Package metadata:

  • Package name: @capyup/pi-codex-image
  • Version: 0.2.2
  • Repository: https://github.com/capyup/pi-codex-image
  • Extension entry: extensions/codex-image.ts
  • Skill directory: skills/image-generation

When syncing with upstream, compare against pi-codex-conversion's image-generation-tool.ts, view-image-tool.ts, and dynamic tool routing in index.ts.