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-usage

v0.3.4

Published

A Codex usage extension for pi: shows ChatGPT Codex subscription usage, remaining limits, credits, and reset times.

Readme

pi-codex-usage

A Codex usage extension for pi.

What it does:

  • Shows your current ChatGPT Codex usage windows from the local Codex CLI app-server.
  • Shows a compact usage card above the editor with used/left percentages, reset times, plan, credits, and banked resets.
  • Keeps itself hidden by default; the usage card disappears automatically when you send your next prompt.
  • Can enable a persistent compact footer status that refreshes automatically every 60 seconds.
  • Registers a codex_usage tool so the agent can answer usage-limit questions directly.

Example output:

Codex usage — updated 7/9/2026, 11:08:00 PM
Plan: plus
5h limit:     [██████████░░] 82% used · 18% left · resets Fri, Jul 10, 2:28 AM (in 3h 21m)
Weekly limit: [██░░░░░░░░░░] 13% used · 87% left · resets Thu, Jul 16, 9:28 PM (in 7d)
Banked resets: 2 available, next expires Sun, Jul 26, 4:38 PM (in 17d)

Requirements

  • Codex CLI on PATH.
  • Codex signed in with ChatGPT auth:
codex login

This extension calls:

codex app-server --listen stdio://
account/rateLimits/read

If Codex auth is expired, run codex login or codex logout && codex login and retry.

Install

pi install npm:pi-codex-usage

Or from GitHub:

pi install git:github.com/avhagedorn/pi-codex-usage

Or try it for one run:

pi -e git:github.com/avhagedorn/pi-codex-usage

Reload or restart pi after installing:

/reload

Commands

/codex-usage          # fetch usage and show the card above the editor
/codex-usage status   # enable persistent footer status, refreshed every 60s
/codex-usage help     # show command help

By default the extension is hidden: it does not show a footer item or widget until you ask for usage. /codex-usage shows the popup widget, while /codex-usage status enables the footer status persistently for the current session, including when that session is reopened or Pi is reloaded.

Agent tool

The package also registers a codex_usage tool. The agent should use it when you ask things like:

  • “How much Codex usage do I have left?”
  • “When does my 5h Codex window reset?”
  • “What is my weekly Codex usage?”
  • “Do I have banked resets or credits?”

Notes

  • The data is account-level Codex usage, not pi-session-specific usage.
  • The Codex app-server protocol is experimental and may change in future Codex CLI releases.
  • API-key-only Codex setups may not expose ChatGPT subscription usage windows.