A SwiftBar/xbar menu bar widget that shows your GitHub Copilot premium request usage.
- Shows usage percentage in menu bar (color-coded: green → yellow → red)
- Progress bar with requests used/total
- Days until monthly reset
- Quick link to GitHub Copilot settings
brew install swiftbar jq- Go to GitHub Token Settings
- Click Generate new token (Fine-grained)
- Give it a name like "Copilot Usage Widget"
- Under Account permissions, enable Plan → Read-only
- Generate and copy the token
- Copy
copilot-spending.15m.shto your SwiftBar plugins folder - Edit the file and replace:
YOUR_GITHUB_PAT_HEREwith your tokenYOUR_GITHUB_USERNAMEwith your GitHub username
- Set
PLAN_LIMITbased on your plan:- Free:
50 - Pro:
300 - Pro+:
1500
- Free:
chmod +x /path/to/plugins/copilot-spending.15m.shClick the SwiftBar icon → Refresh All
The filename copilot-spending.15m.sh sets refresh to every 15 minutes. Rename to change:
copilot-spending.5m.sh→ 5 minutescopilot-spending.1h.sh→ 1 hour
"Setup" showing in menu bar
- Edit the plugin and set your
GITHUB_TOKENandGITHUB_USERNAME
"Err" showing in menu bar
- Check your token has "Plan" read permission
- Verify your username is correct
Widget not appearing
- Ensure SwiftBar is running
- Check the plugin is in your SwiftBar plugins folder
- Verify the file is executable (
chmod +x)
MIT