by opgginc
Effortless token usage tracker for OpenCode
# Add to your Claude Code skills
git clone https://github.com/opgginc/opencode-barbrew install --cask opgginc/tap/opencode-bar
Download the latest .dmg file from the Releases page.
OpenCode Bar automatically detects and monitors all AI providers registered in your OpenCode configuration. No manual setup required - just install and see your usage across all providers in one unified dashboard.
| Provider | Type | Key Metrics |
|----------|------|-------------|
| OpenRouter | Pay-as-you-go | Credits balance, daily/weekly/monthly cost |
| OpenCode Zen | Pay-as-you-go | Daily history (30 days), model breakdown |
| GitHub Copilot Add-on | Pay-as-you-go | Usage-based billing after exceeding quota |
| Claude | Quota-based | 5h/7d usage windows, Sonnet/Opus breakdown |
| Codex | Quota-based | Primary/Secondary quotas, plan type |
| Gemini CLI | Quota-based | Per-model quotas, multi-account support with email labels and account ID details |
| Nano-GPT | Quota-based | Weekly input tokens quota, USD/NANO balance |
| Kimi for Coding (Kimi K2.5) | Quota-based | Usage limits, membership level, reset time |
| MiniMax Coding Plan | Quota-based | 5h/weekly quotas, Anthropic-style dual-window submenu, OpenCode auth |
| Z.AI Coding Plan | Quota-based | Token/MCP quotas, model usage, tool usage (24h) |
| Brave Search | Quota-based | Monthly search quota, reset schedule |
| Tavily | Quota-based | Monthly search quota, plan usage |
| Synthetic | Quota-based | 5h usage limit, request limits, reset time |
| Antigravity | Quota-based | Local cache reverse parsing (state.vscdb), no localhost dependency |
| Chutes AI | Quota-based | Daily quota limits (300/2000/5000), credits balance |
| GitHub Copilot | Quota-based | Multi-account, daily history, overage tracking, auth source labels |
ndycode/oc-chatgpt-multi-auth~/.opencode/openai-codex-accounts.json and ~/.opencode/projects/*/openai-codex-accounts.jsonauth.json fields such as idToken, accountIdOverride, and organizationIdOverrideNoeFabris/opencode-antigravity-auth (writes ~/.config/opencode/antigravity-accounts.json)jenslys/opencode-gemini-auth (writes google.oauth in OpenCode auth.json)~/.gemini/oauth_creds.json for email/account ID metadata; overlaps are merged with Antigravity accounts)anomalyco/opencode-anthropic-authSoju06/codex-lb (writes ~/.codex-lb/)auth.json (copilot provider entry)github.com entries)~/.config/github-copilot/hosts.json and ~/.config/github-copilot/apps.jsonauth.json plus ~/.opencode/.../openai-codex-accounts.json~/.codex/auth.json~/.codex/auth.json~/.codex-lb/auth.json automatically$XDG_DATA_HOME/opencode, ~/.local/share/opencode, and ~/Library/Application Support/opencodeGemini CLI (email) when email is available, with fallback to Gemini CLI #N# Clone the repository
git clone https://github.com/opgginc/opencode-bar.git
cd opencode-bar
# Build
xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \
-scheme CopilotMonitor -configuration Debug build
# Open the app (auto-detect path)
open "$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -showBuildSettings 2>/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1)/OpenCode Bar.app"
Requirements:
OpenCode Bar includes a powerful CLI for querying provider usage programmatically.
# Option 1: Install via menu bar app
# Click "Install CLI" from the Settings menu
# Option 2: Manual installation
bash scripts/install-cli.sh
# Verify installation
opencodebar --help
# Show all providers and their usage (default command)
opencodebar status
# List all available providers
opencodebar list
# Get detailed info for a specific provider
opencodebar provider claude
opencodebar provider gemini_cli
opencodebar provider minimax_coding_plan
# Output as JSON (for scripting)
opencodebar status --json
opencodebar provider claude --json
opencodebar provider minimax_coding_plan --json
opencodebar list --json
$ opencodebar status
Provider Type Usage Key Metrics
─────────────────────────────────────────────────────────────────────────────────
Claude Quota-based 77% 23/100 remaining
Codex Quota-based 0% 100/100 remaining
Copilot (user1) Quota-based 45% 550/1000 remaining
Copilot (user2) Quota-based 12% 880/1000 remaining
Gemini CLI (user1@gmail.com) Quota-based 0% 100% remaining
Gemini CLI (user2@company.com) Quota-based 15% 85% remaining
Kimi for Coding Quota-based 26% 74/100 remaining
MiniMax Coding Plan Quota-based 0%,0% 100/100 remaining
OpenCode Zen Pay-as-you-go - $12.50 spent
OpenRouter Pay-as-you-go - $37.42 spent
minimax-coding-plan in auth.json.current_interval_usage_count and current_weekly_usage_count behave as remaining counts despite their names, so OpenCode Bar calculates used percent as total - remaining.$ opencodebar status --json
{
"claude": {
"type": "quota-based",
"remaining": 23,
"entitlement": 100,
"usagePercentage": 77,
"overagePermitted": false
},
"copilot": {
"type": "quota-based",
"remaining": 1430,
"entitlement": 2000,
"usagePercentage": 28,
"overagePermitted": true,
"accounts": [
No comments yet. Be the first to share your thoughts!