← Catalog

@maxpaulus/pi-usage

/usage command for pi: Claude Code and OpenAI Codex subscription limits

Package

Install

Install with PiG

pig install npm:@maxpaulus/pi-usage

Install with Pi

pi install npm:@maxpaulus/pi-usage
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 1.0.1 (README.md). PiG does not review it.

pi-usage

A Pi extension that adds a /usage command. It shows how much of your Claude Code and OpenAI Codex subscription limits you have left.

 Claude Code
   5h            ████████████████████████████████████████ 100% left  resets in 1h 33m
   Week          ███████████████████████████████████████░  97% left  resets in 4d 13h

 OpenAI Codex team
   5h            ████████████████████████████░░░░░░░░░░░░  71% left  resets in 25m
   Week          ███████████████████████████████████████░  98% left  resets in 6d 23h

Bars are green above 50% left, yellow from 21% to 50%, and red at 20% or less. Press Esc or Enter to close.

Install

pi install npm:@maxpaulus/pi-usage

To try it for one run:

pi -e npm:@maxpaulus/pi-usage

Log in

/usage uses the logins you already have in Pi:

/login anthropic
/login openai-codex

If a login is missing or expired, that section shows an error. The other section still shows its limits.

Limits

  • The usage endpoints are not official APIs. If Anthropic or OpenAI changes them, that section shows an error until this package is updated.
  • Separate weekly limits for Opus or Sonnet show only when your account has them.

Development

npm install
npm run check
pi -e ./index.ts

Pushes to main publish to npm when the version in package.json is not on npm yet. See .github/workflows/publish.yml.