omp packages

pi-auch0.3.0

Another Usage Checker, Horrified. Compact quota visibility for Pi, with escalating pain as your usage runs out.

GitLab CI/CD Published 1 month ago MIT ~337 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-auch

pi-auch logo

pipeline
status coverage npm
version npm
downloads license

Another Usage Checker, Horrified.

Compact quota visibility for Pi's standard footer. It supports OpenAI Codex and GitHub Copilot without sending model probes.

Install

pi install npm:pi-auch

To try it for one session without installing it:

pi -e npm:pi-auch

Usage appears compactly in Pi's footer as provider, emoji, pain reaction, percentage, and reset time: Cdx 🙂 nice 12%/4h - 😬 ohhh 55%/3d. Reactions escalate from nice to ohhh, auch!, and AUCH!! at adjusted pain scores of 45, 65, and 85. The score is usage percentage plus up to 20 points for the fraction of a known Codex 5-hour or weekly reset window still remaining. Run /auch for full details.

Authentication

  • OpenAI Codex: uses Pi's openai-codex OAuth login and the ChatGPT wham/usage endpoint. It reports both the 5-hour and weekly rolling windows, including time until reset.
  • GitHub Copilot: uses Pi's resolved github-copilot authentication to detect configuration. After Copilot is used in the session, premium-request and generic request limits are read passively from recognized response headers, including counts, percentages, and reset times when supplied. No model request is sent by pi-auch.

pi-auch never opens Pi's credential files, stores provider credentials, logs credentials, or logs provider response bodies. Authentication is resolved through Pi's provider API.

Behavior

Quota is fetched at session start, every minute, and on /auch. Reset countdowns show XdYh for 24 hours or more and XhYm below 24 hours; exhausted quotas show a local-time try back at HHhMMm hint when a reset is known. Passive provider data updates after normal model responses. Requests have deadlines and body-size limits. Concurrent refreshes are deduplicated. A transient failure keeps the last successful value marked as stale.

The passive quota-header conventions are adapted from MIT-licensed @mtrojnar/pi-usage; see THIRD_PARTY_NOTICES.md.

Development

npm install
npm run check
npm pack --dry-run

Run the opt-in live smoke test from a development checkout to check the supported providers configured in the current Pi installation:

npm run smoke
# or: make smoke

The smoke test resolves authentication through Pi's ModelRuntime; it does not inspect credential files, print authentication, or send model probes. Providers without a local subscription are skipped. Codex performs a bounded live quota request and requires both 5-hour and weekly percentage and reset data. Copilot validates Pi authentication but cannot obtain passive quota until normal Copilot use returns recognized quota headers.