Track your GitHub Copilot premium request usage with onWatch.
- GitHub account with an active Copilot subscription (Individual, Business, or Enterprise)
- onWatch installed (Quick Start)
-
Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
Direct link: https://github.com/settings/tokens
-
Click Generate new token → Generate new token (classic)
-
Configure the token:
- Note:
onwatch-copilot(or any name you prefer) - Expiration: Choose based on your preference (no expiration recommended for background tracking)
- Scopes: Check only the
copilotscope
- Note:
-
Click Generate token
-
Copy the token immediately — you won't see it again. It starts with
ghp_.
Add the token to your .env file:
cd ~/.onwatch # or wherever your .env is locatedEdit .env and add:
COPILOT_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Or set it as an environment variable:
export COPILOT_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxonwatch stop
onwatchOr in debug mode to verify:
onwatch --debugYou should see:
Starting Copilot agent (interval: 60s)
Copilot poll successful: 3 quotas tracked
Open http://localhost:9211 and click the Copilot tab.
You'll see:
- Premium Requests: Your monthly limit (300 or 1500 depending on plan)
- Chat: Usually unlimited
- Completions: Usually unlimited
| Quota | Description |
|---|---|
premium_interactions |
Monthly premium model requests (Claude, GPT-4, etc.) |
chat |
Standard chat completions (typically unlimited) |
completions |
Code completions (typically unlimited) |
The dashboard shows:
- Current usage and remaining quota
- Percentage used with color indicators
- Reset date (monthly cycle)
- Usage history and burn rate projections
Verify your token has the copilot scope:
curl -H "Authorization: Bearer ghp_yourtoken" \
https://api.github.com/copilot_internal/userShould return JSON with quota_snapshots. If you get 401/403, regenerate the token with correct scope.
- Ensure you have an active Copilot subscription
- Check that the token hasn't expired
- Look at logs:
tail -f ~/.onwatch/.onwatch.log
- The token is stored locally in your
.envfile - Never commit
.envto version control - onWatch never sends your token anywhere except GitHub's API
- All data stays on your machine (SQLite database)
onWatch uses the same internal API that VS Code, JetBrains, Zed, and other editors use:
GET https://api.github.com/copilot_internal/user
Authorization: Bearer <token>
This endpoint returns real-time quota data including entitlement, remaining count, and reset dates. While undocumented, it's stable and used by all major Copilot integrations.
- Development Guide — Build from source
- README — Quick start and configuration
