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-ai-bridge

v0.2.0

Published

Pi extension to delegate tasks to external AI CLIs (claude, codex, gemini) as background agents

Readme

pi-ai-bridge

A Pi extension that lets the Pi agent — and you — delegate work to other AI CLIs (claude, codex, gemini) as background, full-autonomy agents. The Pi model can call them on its own when useful, or you can trigger them with slash commands.

⚠️ Safety warning

Calls run with full autonomy (yolo) and in the background, and the external agent can read and edit files / run commands in the working directory:

  • claude -p … --dangerously-skip-permissions
  • codex exec … --dangerously-bypass-approvals-and-sandbox -C <cwd>
  • gemini -p … --yolo

Use it only in repositories you trust. The working directory is always explicit (defaults to the session cwd), so the blast radius is that directory.

Install

pi install npm:pi-ai-bridge

This adds "npm:pi-ai-bridge" to ~/.pi/agent/settings.json packages. Restart Pi to load it.

Tools (the model calls these)

| Tool | Purpose | |---|---| | ask_ai({ provider, prompt, wait?, timeoutMs?, cwd?, model? }) | Start an agent. Background by default (returns a jobId); pass wait: true to block and return the output inline. | | check_ai({ jobId, tailLines? }) | Status + output tail of a job. | | list_ai() | Recent / running jobs. | | cancel_ai({ jobId }) | Kill a running job. |

Slash commands (you trigger these)

/ask <claude|codex|gemini> <prompt>        start a background agent
/ask-wait <claude|codex|gemini> <prompt>   run and show the output here (blocks)
/ai-jobs                                   list jobs
/ai-result [id] [lines]                    show status + output (no id = latest job)
/ai-cancel <id>                            cancel a job
/ai-help                                   list commands and providers

Providers

| Provider | Binary | Invocation | |---|---|---| | claude | claude | claude -p <prompt> --dangerously-skip-permissions [--model <m>] | | codex | codex | codex exec <prompt> --dangerously-bypass-approvals-and-sandbox -C <cwd> [-m <m>] | | gemini | gemini | gemini -p <prompt> --yolo [-m <m>] |

The matching CLI must be installed and on your PATH.

Display

  • Tool results are color-coded by status (green = done, red = failed, yellow = running, dim = canceled), with a bold header, via the runtime theme.
  • A "agents running" widget appears below the input while background agents are active, showing provider, job id and elapsed time — similar to background tasks in Claude Code.

Job state

Background jobs are tracked in ~/.pi/agent/ai-bridge/jobs/ as <id>.json (metadata) and <id>.log (combined stdout+stderr). Because jobs are spawned detached with state on disk, they survive a Pi restart.

Local development

npm install
npm run check   # type-check
npm test        # unit tests (providers + jobs)
pi -e ./src/index.ts   # load the extension from this checkout

License

MIT