xbar plugin to show your GitHub Copilot premium interactions quota usage in the macOS menu bar.
- macOS
- xbar
- Python 3 (
python3) - A GitHub token that can access the Copilot usage endpoint this plugin calls.
-
Download/copy the plugin file
copilot_premium_requests.15m.py. -
Make it executable:
chmod +x copilot_premium_requests.15m.py
-
Move it into your xbar plugins folder (xbar → Open Plugins Folder).
-
(Optional) Adjust refresh interval in xbar, or rename using the xbar convention:
{name}.{time}.{ext}- Example:
copilot_premium_requests.5m.pyrefreshes every 5 minutes.
This plugin reads the token from the xbar variable VAR_GITHUB_TOKEN.
- In xbar, open plugin settings for
copilot_premium_requests.15m.py. - Set
VAR_GITHUB_TOKENto your token value.
Security note: keep your token private and do not publish it.
- Normal: shows
used/total - percent. - Unlimited plans: shows
Copilot: ∞. - Errors: shows
Copilot: ?and details in the dropdown.
- "Missing token": you have not set
VAR_GITHUB_TOKENin xbar settings. - HTTP Error: 401/403: token is invalid, expired, or missing required access.
- Timeout / network errors: try again later; GitHub API/network may be temporarily unavailable.
For doubts and questions, email: david@mundosaparte.com
Run it from the terminal to see raw output:
./copilot_premium_requests.15m.pyThe plugin calls:
https://api.github.com/copilot_internal/user
and extracts quota_snapshots.premium_interactions to compute used/total/remaining.