Skip to content

tknkaa/cpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpm

A TUI tool that compares your remaining GitHub Copilot Premium requests against the days left in the billing cycle.

Warning

This tool uses GitHub Copilot's internal API, which is unofficial and not intended for external use. It may break without notice if GitHub changes their API. Use at your own risk.

demo

Installation

cargo

cargo install --git https://github.com/tknkaa/cpm

Usage

# Fetch quota automatically via Copilot Internal API
cpm

# Choose a display style
cpm -s progress   # default
cpm -s text
cpm --style progress
cpm --style text

# Skip API fetch and specify remaining percentage directly
cpm -p 23.4
cpm --percent 23.4

Press any key to exit.

How it works

gh api is used to call the GitHub API and fetch your current quota snapshot, using gh's built-in authentication. If the API call fails, cpm falls back to a TUI prompt where you can enter the remaining percentage manually (visible in your GitHub billing settings).

Requirements

  • GitHub CLI (gh) — for authentication
  • A GitHub account with Copilot enabled

License

MIT

About

Track your GitHub Copilot Premium request quota against the days left in the billing cycle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages