Display GitHub Copilot premium interactions usage in the GNOME Shell top panel.
Derived from claude-usage-extension and codex-usage-extension.
[!NOTE] This was created entirely with AI, I cannot gaurantee it works
- Fetches usage data from
GET https://api.github.com/copilot_internal/user - Shows used credits, remaining credits, reset date, and refresh time
- Supports finite and unlimited plans
- Supports panel display modes: text, progress bar, or both
- Stores GitHub token in login keyring (libsecret), not plaintext settings
Panel label combinations:
Show Token QuantitiesON +Show PercentageOFF ->used/totalShow Token QuantitiesON +Show PercentageON ->used/total (percent)Show Token QuantitiesOFF +Show PercentageON ->percentShow Token QuantitiesOFF +Show PercentageOFF ->Copilot
- GNOME Shell 45-51
- GitHub account with Copilot entitlement/quota available from
/copilot_internal/user - A GitHub token saved in extension preferences
The repository keeps runtime extension files at the root (GNOME extension convention), and developer tooling in scripts/.
.
├── metadata.json
├── extension.js
├── prefs.js
├── ui.js
├── api.js
├── auth.js
├── quota.js
├── stylesheet.css
├── github-copilot-icon.svg
├── schemas/
│ └── org.gnome.shell.extensions.copilot-usage.gschema.xml
└── scripts/
├── deploy-local.sh
├── build-package.sh
└── validate.sh
Use a token that can read Copilot quota data from /copilot_internal/user.
- Open
https://github.com/settings/tokens. - Create a token (classic or fine-grained) with minimum required access.
- Copy the raw token value.
- Open extension preferences and paste it into
GitHub API Token.
The extension stores the token in your login keyring with label GNOME Extension: Copilot Usage API Token.
From the repository root:
-
Validate metadata/schema:
./scripts/validate.sh
-
Deploy locally for live testing:
./scripts/deploy-local.sh
-
Build a distributable zip package:
./scripts/build-package.sh
The package is created at dist/copilot-usage@davidpcls.shell-extension.zip.
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
install_dir="$data_home/gnome-shell/extensions/copilot-usage@davidpcls"
rm -rf "$install_dir"
mkdir -p "$install_dir/schemas"
cp metadata.json extension.js prefs.js ui.js api.js auth.js quota.js stylesheet.css github-copilot-icon.svg LICENSE "$install_dir"
cp schemas/org.gnome.shell.extensions.copilot-usage.gschema.xml "$install_dir/schemas"
glib-compile-schemas "$install_dir/schemas"
gnome-extensions enable copilot-usage@davidpclsIf GNOME Shell has not discovered the extension yet:
- X11: press
Alt+F2, typer, press Enter - Wayland: log out and log back in
- Do not commit
schemas/gschemas.compiled(generated file) - Do not include development files (
.git/,.direnv/,dist/) in extension packages - Keep
metadata.jsonshell-versionaligned with tested GNOME Shell versions - Keep legacy schema keys only when needed for safe upgrades in running sessions
Authin panel: save a valid GitHub token in preferencesKeyring unavailable...: unlock login keyring and save token againToken is not allowed to read Copilot quota: use a token/account allowed to access/copilot_internal/userCopilot quota endpoint unavailable for this account: entitlement/quota may not be exposed for this account- Extension not found: reload GNOME Shell, then run
gnome-extensions enable copilot-usage@davidpcls
This extension is not affiliated with, funded by, or associated with GitHub.