copilot-usage is a Rust CLI tool 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
- Rust and Cargo
- GitHub CLI (
gh) - a GitHub account with access to Copilot premium request billing data
cargo install copilot-usagegit clone https://github.com/kevingosse/copilot-usage.git
cd copilot-usage
cargo build --releaseThe binary will be available at:
target\release\copilot-usage.exe
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.
Log in once:
gh auth loginIf the billing endpoint complains about missing scopes, refresh the user scope:
gh auth refresh -h github.com -s userYou can verify your login with:
gh auth statusRun the default view:
copilot-usageShow the full dashboard with recent daily detail and previous months:
copilot-usage --fullOverride the username or quota if needed:
copilot-usage --username kevingosse --quota 1500Show each gh command and the raw API response for troubleshooting:
copilot-usage --debug--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--debug: print eachghcommand plus raw stdout/stderr tostderr