A GNOME Shell extension that monitors rate limit usage for multiple coding agent services in the top bar.
- Multi-provider support: Monitor Claude Code (Anthropic), Codex (OpenAI), Gemini CLI / Antigravity (Google), GLM (z.ai), and more
- Multi-account: Configure multiple accounts per provider
- Top bar indicator: Concise usage display with text, progress bar, or both; SVG provider icons fetched from CDN and cached locally
- Detailed popup menu: Per-account breakdown with progress bars, reset timers, and usage percentages; theme-adaptive colors for light/dark GNOME Shell themes
- Color-coded usage: Green → Yellow → Orange → Red as usage increases
- Extensible architecture: Clean provider pattern makes it easy to add new services
- Secure credential storage: Tokens stored in GNOME Keyring (Secret Service)
- Auto-detect credentials: Claude Code, Codex, and Gemini read OAuth tokens from local config automatically
- Automatic token refresh: OAuth tokens are refreshed automatically when expired (Claude, Codex, Gemini)
- Rate limit resilience: 429 responses trigger per-account backoff using
Retry-Afterheader - Proxy support: Optional HTTP proxy for all API requests
| Provider | Auth Method | API |
|---|---|---|
| Claude Code (Anthropic) | Auto-detect from ~/.claude/.credentials.json |
Anthropic OAuth Usage API |
| Codex (OpenAI/ChatGPT) | Auto-detect from ~/.codex/auth.json |
ChatGPT Internal API |
| Gemini (Gemini CLI / Antigravity) | Auto-detect from ~/.gemini/oauth_creds.json |
Google Code Assist API |
| GLM (z.ai) | Manual API key | z.ai Monitor API |
Notes:
- The Gemini provider uses the Gemini CLI OAuth/Code Assist backend. Antigravity works when it shares that backend state.
- Standalone Antigravity secure-storage extraction is not implemented in this first pass.
The extension uses a clean provider pattern. To add support for a new coding agent:
- Create a new file in
providers/extendingBaseProvider - Implement
fetchUsage()returning normalizedUsageResultdata - Register the provider in
providerRegistry.js
See providers/base.js for the interface definition and providers/claude.js for a reference implementation.
- GNOME Shell 45 or later (Ubuntu 24.04+, Fedora 40+, etc.)
libsoup3(usually pre-installed)libsecret/ GNOME Keyring (usually pre-installed)
git clone https://github.com/hans/coding-agent-rate-limit-indicator.git
cd coding-agent-rate-limit-indicator
chmod +x install.sh
./install.shThen restart GNOME Shell and enable the extension:
# On X11: Alt+F2 → r → Enter
# On Wayland: log out and back in
gnome-extensions enable coding-agent-rate-limit-indicator@github.comOpen the extension preferences via GNOME Extensions app or:
gnome-extensions prefs coding-agent-rate-limit-indicator@github.com- Refresh interval: 60–3600 seconds (default: 300)
- Display mode: Text, Progress Bar, or Both
- HTTP Proxy: Optional proxy URL for API requests
- Open extension preferences → Accounts tab
- Click "Add Claude Code account"
- Enter a display name (e.g., "Work", "Personal")
- The extension auto-detects your OAuth token from
~/.claude/.credentials.json - For multiple Claude accounts, specify different credential file paths
- Open extension preferences → Accounts tab
- Click "Add Codex account"
- Enter a display name
- The extension auto-detects your OAuth token from
~/.codex/auth.json(written by the Codex CLI after login) - For a custom credential file location, set the
CODEX_HOMEenvironment variable or specify a path in account settings
- Open extension preferences → Accounts tab
- Click "Add GLM account"
- Enter a display name
- Enter your z.ai API key in the token field
- Log in to z.ai and generate an API key from your account settings
- Open extension preferences → Accounts tab
- Click "Add Gemini account"
- Enter a display name
- The extension auto-detects your OAuth token from
~/.gemini/oauth_creds.json - If your Gemini account requires a Google Cloud project, set it in the account settings
- Choose the per-account panel quota strategy:
Most constrained: show the tightest quota bucket in the panelPooled first: prefer the pooled bucket when availablePooled only: show only the pooled bucket in the panel
├── extension.js # Main entry point, panel UI, popup menu, refresh logic
├── prefs.js # Preferences window (libadwaita)
├── constants.js # Shared constants
├── accounts.js # Multi-account CRUD operations
├── secret.js # GNOME Keyring integration
├── iconCache.js # Fetches and caches provider SVG icons from CDN
├── providerRegistry.js # Provider registration and lookup
├── providers/
│ ├── base.js # Base provider interface
│ ├── claude.js # Claude Code (Anthropic) provider
│ ├── codex.js # Codex (OpenAI) provider
│ ├── gemini.js # Gemini CLI / Antigravity (Google) provider
│ └── glm.js # GLM (z.ai) provider
├── schemas/ # GSettings schema
├── stylesheet.css # Extension styles
├── install.sh # Installation script
└── uninstall.sh # Uninstallation script
- Separation of concerns: Display layer (
extension.js) is fully decoupled from data fetching (providers/) - Normalized data model: All providers return the same
UsageResultformat regardless of API differences - Multi-account first: Every provider supports multiple accounts from day one
- Graceful degradation: Shows stale data with a marker when refresh fails, never crashes
Inspired by these excellent GNOME Shell extensions:
- claude-usage-extension by Haletran
- ccusage-indicator by lordvcs
- codex-usage-indicator by stonega
MIT License. See LICENSE for details.
This extension is not affiliated with, funded by, or associated with Anthropic, OpenAI, Google, or Antigravity.