Track usage across your AI coding agents in one place.

| Agent | Data Source | Manual Key | OpenCode | Env Var | Multi-Account | Setup |
|---|---|---|---|---|---|---|
| AIHubMix | AIHubMix user self API | ✓ | — | ✓ | — | Paste the Access Key from https://console.aihubmix.com/setting, or set AIHUBMIX_ACCESS_KEY |
| Amp | Local SQLite database | — | — | — | — | Auto-detected from local database |
| Claude | Anthropic OAuth Usage API | — | ✓ | — | ✓ | Run claude to log in, and add extra CLAUDE_CONFIG_DIR paths under Additional Claude Homes for more accounts |
| ClinePass | Cline API | ✓ | — | — | ✓ | Auto-detected from the local Cline login, or add a user ID and API key via Manage Accounts |
| Codex | OpenAI API | ✓ | — | — | ✓ | Run codex login, add additional CODEX_HOME paths in preferences, or paste a token manually |
| Copilot | GitHub Copilot internal API | ✓ | — | ✓ | ✓ | Add named accounts, sign in with GitHub CLI, or use GH_TOKEN/GITHUB_TOKEN |
| Cursor | Cursor API | ✓ | — | — | — | Auto-detected from Cursor app login, or paste cookie header in preferences |
| DeepSeek | DeepSeek balance API | ✓ | ✓ | ✓ | — | Use OpenCode deepseek, set DEEPSEEK_API_KEY/DEEPSEEK_KEY, or paste an API key |
| Droid | Factory AI API | — | — | — | — | Run droid command to login |
| Gemini | Local state file | — | — | — | — | Auto-detected from local state |
| Grok | grok.com billing API | — | — | — | — | Auto-detected from ~/.grok/auth.json after grok login |
| Kimi | Moonshot API | ✓ | ✓ | — | ✓ | Use OpenCode kimi-for-coding, or paste token from https://www.kimi.com/code/console |
| Antigravity | Google API | — | — | — | — | Auto-detected from local API |
| Synthetic | Synthetic API | ✓ | ✓ | — | ✓ | Use OpenCode synthetic, or paste API key from https://synthetic.new/billing |
| MiniMax | MiniMax API | ✓ | ✓ | ✓ | — | Use OpenCode minimax-coding-plan, set MINIMAX_API_KEY env var, or paste token in preferences |
| MinimaxCN | MinimaxCN API (国内版) | ✓ | — | ✓ | — | Set MINIMAX_CN_API_KEY env var, or paste token in preferences |
| OpenCode Go | OpenCode API | ✓ | ✓ | — | — | Select OpenCode Go when running opencode auth login, or paste your subscribed account's API key into the OpenCode Go API Key preference. The manual preference takes priority. |
| OpenRouter | OpenRouter credits API | ✓ | ✓ | ✓ | — | Use OpenCode openrouter, set OPENROUTER_API_KEY/OPENROUTER_KEY, or paste an API key |
| Raycast | Raycast website credits API | ✓ | — | — | — | Paste the __raycast_session cookie from https://www.raycast.com/settings in preferences |
| z.ai (GLM) | Zhipu API | ✓ | ✓ | ✓ | ✓ | Paste token, use OpenCode zai-coding-plan, or set ZAI_API_KEY/GLM_API_KEY env var |
Legend:
~/.local/share/opencode/auth.jsonClinePass reads the shared Cline login from ~/.cline/data/settings/providers.json, with ~/.cline/data/secrets.json supported as a legacy fallback. Expired file-backed sessions are refreshed through Cline and saved atomically to the source file while preserving unrelated settings. If Cline replaces the credential while Agent Usage is fetching, Agent Usage rereads the file and uses Cline's newer value instead of overwriting it.
Additional ClinePass accounts can be added from the in-view Manage Accounts action. Each manual account requires a Cline user ID beginning with usr- and an API key beginning with sk_.
Agent Usage shows your AIHubMix account balance. Copy the Access Key from AIHubMix Settings, then paste it into the AIHubMix Access Key extension preference, or set AIHUBMIX_ACCESS_KEY in your shell. The preference takes priority if both are set.
Agent Usage shows your DeepSeek API balance, including total, topped-up, and granted balances. Create an API key from the DeepSeek Platform, then configure it using one of these methods:
deepseek providerDEEPSEEK_API_KEY or DEEPSEEK_KEY in your shell environmentManual preferences take priority, followed by OpenCode and environment variables.
Agent Usage shows the credits you have left on OpenRouter. Create a key from OpenRouter Keys, then configure it using one of these methods:
openrouter providerOPENROUTER_API_KEY or OPENROUTER_KEY in your shell environmentManual preferences take priority, followed by OpenCode and environment variables.
Which balance is shown depends on the key type. A provisioning key can read the account ledger (/api/v1/credits), so the row shows account-wide credits purchased minus credits used. A regular inference key cannot read that ledger, so Agent Usage falls back to the key endpoint (/api/v1/key) and shows that key's own spending cap instead — or $X.XX used when the key has no cap.
Agent Usage shows your remaining Raycast AI credits, plan, and next renewal date. Sign in at Raycast Settings, copy the __raycast_session cookie value from your browser's developer tools, and paste it into the Raycast Session Cookie extension preference. A full Cookie header containing it also works.
When you have multiple accounts configured for a provider (e.g., multiple Kimi API keys), the extension shows a ⚡ bolt icon next to the account that is currently being used by OpenCode. This helps you identify which account is actively being consumed.
The indicator appears in:
This works by comparing your stored account tokens with the keys configured in ~/.local/share/opencode/auth.json.
gh auth tokengh auth tokenGH_TOKEN and GITHUB_TOKEN are shown as separate auto-detected accounts; Agent Usage resolves them from your login shell when Raycast doesn't inherit the shell environmenthttps://api.github.com/copilot_internal/userThe legacy Copilot Authorization Token preference remains supported as a Preference account.
⌘⌥↑ / ⌘⌥↓ to reorder agents in the list| Shortcut | Action |
|---|---|
↵ | Refresh usage data |
⌘C | Copy usage details |
⌘⇧C | Copy API key (when available) |
⌘M | Manage Accounts (multi-account) |
⌘⌥↑ | Move agent up |
⌘⌥↓ | Move agent down |
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run linter
npm run lint
More agents coming soon.
MIT
Show agents usage
Show agent usage in the menu bar
Refresh cached usage for enabled providers in the background
CLAUDE_CONFIG_DIR directories (e.g. ~/.claude-personal, ~/.claude-work), mirroring Additional Codex Homes. Accounts are labelled from their directory (~/.claude-work → "Claude • work")~/.claude-work stays "Claude • work"; the stock ~/.claude names nothing, so it falls back to the signed-in account ("Claude • yourname") instead of an unattributable bare "Claude" row. The account email and organization are shown in the detail pane, the tooltip and the copied usage text.credentials.json. Claude Code writes to the Keychain, so a credentials file left next to it can be days stale — Claude could report "Token Expired" while a valid token was already stored. Keychain services are resolved per config dir (the bare service for ~/.claude, and a sha256(<config dir>) prefix for others), with the credentials file as fallback~/.claude symlinked to a profile directory produced two Keychain entries with different tokens for one account, which token de-duplication alone could not catchuser:profile scope now shows that error on its own row instead of hiding the account100 − remaining consistently across the main list, menu bar, tooltips, detail views, and copied usage text (e.g. 58% remaining → 42% used)agy language server is not running, so Agent Usage still shows Gemini/Claude weekly and 5-hour limitsloadCodeAssistopenrouter login, OPENROUTER_API_KEY/OPENROUTER_KEY, or a pasted API key/api/v1/credits with a provisioning key, and fall back to the key's own spending cap from /api/v1/key for a regular inference keyhttps://opencode.ai/zen/go/v1/usage) instead of scraping the workspace web page~/.local/share/opencode/auth.json)gh auth token, then fall back to GITHUB_TOKEN and GH_TOKEN as separate auto-detected accounts while retaining the legacy preference token24 / 300 creditsamp usage when labels are markdown-bold (**Amp Free:**), which is what the CLI emits when it is not attached to a TTY (Raycast's fetch path)AIHUBMIX_ACCESS_KEYcurrent_interval_remaining_percent fallback when counts are 0language_server binary shipped by Antigravity 2.7+, which left the Antigravity row stuck on "Not Running" while the app was running~/.cline (install the CLI or IDE extension & login) with support for manual User ID & API Key entrylimits arraycurrent_interval_remaining_percent / current_weekly_remaining_percent when counts are 0, treat status === 1 as an active plan window, and pick the active model first instead of matching by MiniMax-M* model name (new API uses general / video)parse_error on Plus plan: tolerate rate_limit.secondary_window: null by detecting 5h vs weekly windows via limit_window_seconds, make fiveHourLimit / weeklyLimit optional, and skip the missing section in the detail viewamp CLI output~/.grok/auth.json (or $GROK_HOME/auth.json) after grok loginagy CLI and antigravity-cli installations as a fallback when the Antigravity app is not runningRetrieveUserQuotaSummary endpoint) for both the app and CLI when the daemon supports it; the menubar reflects the lowest remaining percentage across all buckets, and falls back to the per-model view on older daemonsCODEX_HOME / ~/.codex, using the format from https://github.com/loongphy/codex-authCLAUDE_CONFIG_DIR when reading Claude credentialsminimax-coding-plan) or MINIMAX_API_KEY environment variableGH_TOKEN / GITHUB_TOKEN with preference fallback~/.local/share/opencode/auth.json)⌘⇧C from the provider list or Manage Accounts screen~/.local/share/opencode/auth.json)72% instead of 72% remaining to match other providersGET /coding/v1/usages)decodeJwtPayload, getRemainingPercent, formatDuration, cleanString) to eliminate code duplicationpercentage field is "percentage used" not "percentage remaining", so remaining = 100 - percentagevisibleAgentshandleRefresh (both branches were identical)Cmd+C keyboard shortcut from Copy API Key actionsrenderUnsupportedDetail functionOpen … Settings actions using Raycast’s Keyboard.Shortcut.Common.Open~/.factory/auth.* (zero config)~/.codex/auth.json (zero config)ZAI_API_KEY / GLM_API_KEY)