@aki77/copilot_premium_usage
v0.1.0
Published
CLI tool for analyzing Copilot Premium Usage CSV files
Readme
Copilot Premium Usage CLI Tool
A TypeScript CLI tool for analyzing Copilot Premium Usage CSV files.
Features
- Parse CSV files and display usage statistics
- Track current usage and quota utilization
- Predict time to quota exceeded based on current usage pace
- Show model-wise usage distribution
- Basic error handling for file and parsing errors
Installation
npm install
npm run buildUsage
# Using npx (recommended)
npx @aki77/copilot_premium_usage path/to/usage.csv
# Using npm script (for development)
npm run dev path/to/usage.csv
# Or run directly after building
node dist/cli.js path/to/usage.csvCSV Format
The tool expects CSV files with the following columns:
Timestamp: ISO 8601 timestampUser: UsernameModel: Model name (e.g., "Coding Agent", "claude-sonnet-4")Requests Used: Number of requests (integer)Exceeds Monthly Quota: Boolean ("True" or "False")Total Monthly Quota: Total monthly quota limit (integer)
Example CSV:
"Timestamp","User","Model","Requests Used","Exceeds Monthly Quota","Total Monthly Quota"
"2025-06-21T21:47:19.3011530Z","aki77","Coding Agent","1","False","1500"
"2025-06-21T21:47:11.2323600Z","aki77","Coding Agent","1","False","1500"
"2025-06-21T21:36:42.4388090Z","aki77","claude-sonnet-4","1","False","1500"Testing
npm test # Run tests in watch mode
npm run test:run # Run tests onceDevelopment
npm run build # Compile TypeScript
npm run dev # Build and run with sample data