Installation
Homebrew (Easy)
brew install --cask opgginc/tap/opencode-bar
Download
Download the latest .dmg file from the Releases page.
Overview
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.
Supported Providers (Auto-detected from OpenCode)
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
OpenCode Go Quota-based 5h/weekly/monthly usage windows, model API validation, OpenCode auth
Grok Quota-based Monthly usage, reset time, email-scoped subscription settings, local session tokens
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
OpenCode Plugins
-
ChatGPT / Codex
-
ndycode/oc-chatgpt-multi-auth -
Reads
~/.opencode/openai-codex-accounts.jsonand~/.opencode/projects/*/openai-codex-accounts.json -
Also understands plugin-managed OpenCode
auth.jsonfields such asidToken,accountIdOverride, andorganizationIdOverride -
Antigravity/Gemini
-
NoeFabris/opencode-antigravity-auth(writes~/.config/opencode/antigravity-accounts.json) -
jenslys/opencode-gemini-auth(writesgoogle.oauthin OpenCodeauth.json) -
Gemini CLI OAuth creds (writes
~/.gemini/oauth_creds.jsonfor email/account ID metadata; overlaps are merged with Antigravity accounts) -
Claude:
anomalyco/opencode-anthropic-auth
Standalone tools
- Codex:
Soju06/codex-lb(writes~/.codex-lb/)
Other AI agents beyond OpenCode that supports auto-detection
-
GitHub Copilot (multi-source discovery)
-
OpenCode auth - Auto-detected from OpenCode
auth.json(copilotprovider entry) -
Copilot CLI - Auto-detected through macOS Keychain (
github.comentries) -
VS Code / Cursor - Auto-detected from
~/.config/github-copilot/hosts.jsonand~/.config/github-copilot/apps.json -
Browser Cookies - Chrome, Brave, Arc, Edge session cookies
-
Multiple accounts from different sources are automatically deduplicated and merged
-
Codex
-
OpenCode + oc-chatgpt-multi-auth - Auto-detected from OpenCode
auth.jsonplus~/.opencode/.../openai-codex-accounts.json -
Codex for Mac - Auto-detected through
~/.codex/auth.json -
Codex CLI - Auto-detected through
~/.codex/auth.json -
codex-lb - Auto-detected through
~/.codex-lb/ -
Claude Code CLI - Keychain-based authentication detection
Features
Automatic Provider Detection
-
Zero Configuration: Reads your OpenCode
auth.jsonautomatically -
Multi-path Support: Searches
$XDG_DATA_HOME/opencode,~/.local/share/opencode, and~/Library/Application Support/opencode -
Dynamic Updates: New providers appear as you add them to OpenCode
-
Smart Categorization: Pay-as-you-go vs Quota-based providers displayed separately
Real-time Monitoring
-
Menu Bar Dashboard: View all provider usage at a glance
-
Visual Indicators: Color-coded progress (green → yellow → orange → red)
-
Detailed Submenus: Click any provider for in-depth metrics
-
Auth Source Labels: See where each account token was detected (OpenCode, VS Code, Keychain, etc.)
-
Gemini Account Labels: Shows
Gemini CLI (email)when email is available, with fallback toGemini CLI #N
Usage History & Predictions
-
Daily Tracking: View request counts and overage costs
-
EOM Prediction: Estimates end-of-month totals using weighted averages
-
Add-on Cost Tracking: Shows additional costs when exceeding limits
Subscription Settings (Quota-based Providers Only)
-
Per-Provider Plans: Configure your subscription tier for quota-based providers
-
Cost Tracking: Accurate monthly cost calculation based on your plan
-
Orphaned Plan Cleanup: Detect and reset stale subscription entries that no longer match accounts
Convenience
-
Launch at Login: Start automatically with macOS
-
Parallel Fetching: All providers update simultaneously for speed
-
Auto Updates: Seamless background updates via Sparkle framework
Development
Build from Source
# 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:
-
macOS 13.0+
-
Xcode 15.0+ (for building from source)
-
OpenCode installed with authenticated providers
Usage
Menu Bar App
-
Install OpenCode: Make sure you have OpenCode installed and authenticated with your providers
-
Launch the app: Run OpenCode Bar
-
View usage: Click the menu bar icon to see all your provider usage
-
GitHub Copilot (optional): Automatically detected from multiple sources — OpenCode auth, Copilot CLI Keychain, VS Code/Cursor config files, and browser cookies (Chrome, Brave, Arc, Edge). Multiple accounts are deduplicated automatically.
Command Line Interface (CLI)
OpenCode Bar includes a powerful CLI for querying provider usage programmatically.
Installation
# 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
Commands
# 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
opencodebar provider opencode_go
# Output as JSON (for scripting)
opencodebar status --json
opencodebar provider claude --json
opencodebar provider minimax_coding_plan --json
opencodebar list --json
Table Output Example
$ 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 Go Quota-based 12%,25%,50% 50/100 remaining
Grok Quota-based 15% 85/100 remaining
OpenCode Zen Pay-as-you-go - $12.50 spent
OpenRouter Pay-as-you-go - $37.42 spent
MiniMax Notes
-
MiniMax Coding Plan is resolved from the OpenCode auth entry
minimax-coding-planinauth.json. -
OpenCode Bar uses the Coding Plan remains endpoint and converts it into used percentages for the menu bar app and CLI.
-
MiniMax response fields
current_interval_usage_countandcurrent_weekly_usage_countbehave as remaining counts despite their names, so OpenCode Bar calculates used percent as `total - remaini