pi-credits

A pi extension that shows the active provider's credit balance or rate-limit usage

Packages

Package details

extension

Install pi-credits from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-credits
Package
pi-credits
Version
0.3.1
Published
Jun 11, 2026
Downloads
not available
Author
zlliang
License
MIT
Types
extension
Size
2.6 MB
Dependencies
2 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ],
  "image": "https://raw.githubusercontent.com/zlliang/pi-credits/main/assets/cover.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Cover

pi-credits

A pi extension that shows the active model provider's credit balance or rate-limit usage in the footer. It appears only for supported providers and uses the provider's stored credential or API key.

Screenshot

Example with an OpenAI Codex subscription, paired with my pi-spark package.

Supported providers

  • DeepSeek
  • Fireworks
  • Moonshot
  • OpenAI Codex
  • OpenRouter
  • Vercel AI Gateway

Most provider-specific fetching approaches references CodexBar. Fireworks is an exception: its balance lives behind an internal gRPC API, so the approach was reverse-engineered from the firectl binary — see docs/fireworks.md.

Install

Install from npm:

pi install npm:pi-credits

Install from git:

pi install git:github.com/zlliang/pi-credits

Other pi packages

  • pi-spark: a small, opinionated collection of pi extensions.