Skip to content

petender/CopilotConsumptionViewer

Repository files navigation

Copilot Consumption Viewer

copilot-consumption-viewer is a .NET 10 CLI that tracks GitHub Copilot premium request usage and forecasts whether your current pace is sustainable for the rest of the month.

It fetches billing data through your authenticated gh session and renders a terminal dashboard with:

  • month-to-date usage and remaining quota
  • average daily pace
  • a "today budget" progress bar
  • projected month-end cushion or overshoot
  • a 6-month consumption bar chart
  • model breakdown for the current month

Requirements

  • GitHub CLI (gh)
  • a GitHub account with access to Copilot premium request billing data
  • .NET SDK 10.0

Quick Start

dotnet run -- --help
dotnet run

Common Options

  • --username <USER>
  • --quota <N>
  • --months <N>
  • --debug

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 view:

dotnet run

Override the username or quota if needed:

dotnet run -- --username <your-username> --quota 1500

Show each gh command and the raw API response for troubleshooting:

dotnet run -- --debug

Use a custom history window:

dotnet run -- --months 12

Options

  • --username <USER>: GitHub username. If omitted, the tool tries GITHUB_USER, GH_USERNAME, then gh api user --jq .login
  • --quota <N>: monthly quota override, default 1500
  • --months <N>: number of previous months to compare, default 6
  • --debug: print each gh command plus raw stdout/stderr to stderr

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages