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

v0.2.1

Published

Pi extension that exposes Codex CLI image generation as a smoother codex_image tool.

Readme

pi-codex-image

Pi extension that exposes the local Codex CLI's built-in image generation capability as a Pi tool named codex_image.

Why this version is smoother for agents

This package is designed to reduce the two biggest failure modes we hit in practice:

  1. execution drift — the extension now sends the prompt to codex exec over stdin, which matches the current Codex CLI behavior
  2. discoverability drift — the extension explicitly bridges user phrasing like pi-codex-image, use Codex, or ask Codex to generate an image to the canonical Pi tool name codex_image

It also adds:

  • startup preflight checks
  • argument normalization (input_images, output_path, references, etc.)
  • a /codex-image-doctor command
  • stronger single-image behavior when outputPath is set

What it does

When Pi calls codex_image, the extension:

  1. checks that Codex is installed and logged in
  2. creates a temporary CODEX_HOME
  3. copies your Codex auth into that temp home
  4. runs codex exec non-interactively with image_generation enabled
  5. collects generated image file(s)
  6. returns the image(s) back to Pi
  7. optionally copies the single output image to a requested path

This extension does not call an image API directly. It is a thin bridge from Pi to the local codex CLI.

Requirements

  • Pi
  • local codex CLI installed and on PATH
  • Codex logged in with ChatGPT (~/.codex/auth.json present)

Install

From git

pi install git:github.com/tmustier/pi-codex-image

From a local checkout

pi install ~/.pi/agent/extensions/pi-codex-image

For a one-off test

pi -e git:github.com/tmustier/pi-codex-image

User phrasing that should map cleanly

These are all intended to resolve to the same extension-backed capability:

  • use pi-codex-image
  • ask Codex to generate an image
  • use Codex for this diagram
  • edit this image with Codex

The canonical callable Pi tool remains:

  • codex_image

Tool

codex_image

Parameters:

  • prompt — required text prompt
  • inputImages — optional array of local image paths
  • outputPath — optional exact file path for the final image
  • overwrite — optional boolean for replacing outputPath
  • model — optional Codex model override
  • timeoutSec — optional timeout, default 180

The tool also normalizes common argument variants such as:

  • input_images
  • output_path
  • references
  • request
  • instructions
  • timeout

Command

/codex-image-doctor

Checks whether the extension is ready to register and run, including:

  • codex availability on PATH
  • auth file presence
  • required codex exec flags

Notes

  • outputPath only works when Codex produces exactly one image
  • the extension asks Codex for a single final image by default unless the user explicitly requests variants
  • the extension runs Codex with a temporary CODEX_HOME and removes it afterward

License

MIT