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

imgify-pi

v0.1.0

Published

pi extension: convert a written prompt into an image and send it to the chat model

Downloads

190

Readme

imgify (pi extension)

Convert a written prompt/message into an image and send that image to the chat model. The chat model must be vision-capable (image in its input types) to actually "see" the image.

The image is generated locally — the prompt text is rendered onto a PNG with no AI image model and no API key. (The only AI model in the loop is the chat model that receives the image.)

Install

As a published pi package (recommended):

pi install npm:imgify-pi

From this repo (local development):

cd pi
npm install          # pulls @napi-rs/canvas for local text rendering

# register it as a project-local package (writes .pi/settings.json -> packages)
pi install ./pi -l

This repo's .pi/settings.json already lists ../pi under packages, so running pi in the repo root loads the extension automatically (after the project is trusted). After editing, run /reload (or restart pi) to pick up changes.

Alternative manual methods (also work):

# symlink/copy into the auto-discovered project-local extensions dir
ln -sfn ../../pi .pi/extensions/imgify
cp -r pi .pi/extensions/imgify

# or run it ad-hoc for one session
pi -e ./pi/index.ts

Usage

Three entry points:

  1. Prefix trigger (input transform). With the default config, a message starting with imgify is converted and the image is attached to the message before the agent sees it:

    imgify Draw a cat wearing a hat

    Note: the trigger uses no @ because pi reserves @<path> for attaching files. Set IMAGIFY_TRIGGER=always to convert every message.

  2. Slash command:

    /imgify Explain this diagram
  3. Tool — the LLM can call imgify to generate an image and reason about it.

Configuration (environment variables)

| Variable | Default | Meaning | |----------|---------|---------| | IMAGIFY_TRIGGER | prefix | prefix or always | | IMAGIFY_PREFIX | imgify | Trigger prefix in prefix mode | | IMAGIFY_COMMAND | imgify | Slash command name | | IMAGIFY_OUTPUT_DIR | <cwd>/.imgify | Where generated PNGs are also saved | | IMAGIFY_RENDER_BG | #0d1117 | Render background color | | IMAGIFY_RENDER_FG | #e6edf3 | Render text color | | IMAGIFY_RENDER_FONT_SIZE | 36 | Render font size (px) | | IMAGIFY_RENDER_PADDING | 40 | Render padding (px) | | IMAGIFY_RENDER_MAX_WIDTH | 900 | Render canvas width (px) | | IMAGIFY_RENDER_FONT_FAMILY | auto | Explicit font family (else auto-detected) |

How images are generated

The prompt text is rendered onto a PNG locally using @napi-rs/canvas. No AI image model and no API key are required. A system font is auto-detected via fontconfig. The resulting image literally contains the prompt text, which a vision chat model can then read back.

Files

  • index.ts — extension entry (input transform, command, tool)
  • image-gen.ts — local text rendering
  • config.ts — environment-based configuration