copilot-usage-1.0.0 is not a library.
copilot-usage
copilot-usage is a one-shot Rust CLI that shows how fast you're consuming GitHub Copilot premium requests and whether that pace is sustainable for the rest of the month.
It fetches billing data through your logged-in gh session, then prints a compact terminal dashboard with:
- month-to-date usage and remaining quota
- average daily pace
- a "today budget" progress bar
- projected month-end cushion or overshoot
- optional
--fullhistory details
Sample output
┌──────────────────────────────────────────────────────┐
│ 🤖 GitHub Copilot Premium Request Usage │
│ Month: March 2026 Quota: 1,500 │
│ As of: March 11, 2026 UTC │
│ Used: 118.33 Remaining: 1,381.67 (7.9% consumed) │
│ ██░░░░░░░░░░░░░░░░░░░░░░░░ 7.9% │
└──────────────────────────────────────────────────────┘
📈 Pace & Projection
─────────────────────────────────────────────
Avg daily usage (MTD): 10.8 req/day
Days elapsed: 11 / 31
Today budget: ██████░░░░░░░░░░ 27 / 69.08
Projected month-end: +1,166.52 requests (UNDER QUOTA ✓)
Requirements
- Rust and Cargo
- GitHub CLI (
gh) - a GitHub account with access to Copilot premium request billing data
Install
Install with cargo
cargo install copilot-usage
Build from a local checkout
git clone https://github.com/kevingosse/copilot-usage.git
cd copilot-usage
cargo build --release
The binary will be available at:
target\release\copilot-usage.exe
Install into Cargo's bin directory
git clone https://github.com/kevingosse/copilot-usage.git
cd copilot-usage
cargo install --path .
After that, you can run copilot-usage directly from your shell.
Authenticate with gh
Log in once:
gh auth login
If the billing endpoint complains about missing scopes, refresh the user scope:
gh auth refresh -h github.com -s user
You can verify your login with:
gh auth status
Usage
Run the default fast view:
copilot-usage
Or run it from source without installing:
cargo run --release --
Show the full dashboard with recent daily detail and previous months:
copilot-usage --full
Override the username or quota if needed:
copilot-usage --username kevingosse --quota 1500
Options
--username <USER>: GitHub username. If omitted, the tool triesGITHUB_USER,GH_USERNAME, thengh api user --jq .login--quota <N>: monthly quota override, default1500--months <N>: number of previous months to compare in--full, default6--full: show the full dashboard with sparkline, previous months, and model breakdown