{"id":43720862,"url":"https://github.com/opgginc/opencode-bar","last_synced_at":"2026-03-05T18:01:16.706Z","repository":{"id":333263073,"uuid":"1136724882","full_name":"opgginc/opencode-bar","owner":"opgginc","description":"Effortless token usage tracker for OpenCode","archived":false,"fork":false,"pushed_at":"2026-02-28T16:47:19.000Z","size":6932,"stargazers_count":176,"open_issues_count":4,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T19:44:44.553Z","etag":null,"topics":["antigravity","claude-code","copilot","gemini","mac-app","opencode"],"latest_commit_sha":null,"homepage":"https://op.gg/open-source/opencode-bar","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opgginc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-18T08:22:21.000Z","updated_at":"2026-02-28T16:47:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/opgginc/opencode-bar","commit_stats":null,"previous_names":["kargnas/copilot-usage-monitor","kargnas/opencode-bar","opgginc/opencode-bar"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/opgginc/opencode-bar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opgginc%2Fopencode-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opgginc%2Fopencode-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opgginc%2Fopencode-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opgginc%2Fopencode-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opgginc","download_url":"https://codeload.github.com/opgginc/opencode-bar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opgginc%2Fopencode-bar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30141268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antigravity","claude-code","copilot","gemini","mac-app","opencode"],"created_at":"2026-02-05T08:08:46.734Z","updated_at":"2026-03-05T18:01:16.693Z","avatar_url":"https://github.com/opgginc.png","language":"Swift","readme":"## Monthly Changelog (February 2026)\n\n### Highlights\n- Released **OpenCode Bar v2.0.0** with multi-provider monitoring and the modernized menu bar architecture ([#12](https://github.com/opgginc/opencode-bar/pull/12)).\n- Added major provider coverage across app and CLI: **Kimi for Coding**, **Z.AI Coding Plan**, **Chutes AI**, **Synthetic**, **Nano-GPT**, **Brave Search**, and **Tavily** ([#34](https://github.com/opgginc/opencode-bar/pull/34), [#43](https://github.com/opgginc/opencode-bar/pull/43), [#51](https://github.com/opgginc/opencode-bar/pull/51), [#65](https://github.com/opgginc/opencode-bar/pull/65), [#66](https://github.com/opgginc/opencode-bar/pull/66), [#76](https://github.com/opgginc/opencode-bar/pull/76), [#85](https://github.com/opgginc/opencode-bar/pull/85)).\n- Expanded **Codex** and **Gemini CLI** support with Codex LB account discovery, Spark window grouping/fallback parsing, auto-detection, per-model windows, and account-aware labels ([#74](https://github.com/opgginc/opencode-bar/pull/74), [#75](https://github.com/opgginc/opencode-bar/pull/75), [#77](https://github.com/opgginc/opencode-bar/pull/77), [#63](https://github.com/opgginc/opencode-bar/pull/63)).\n- Improved **Claude** quota clarity with extra usage breakdowns, reset fixes, and account separation by email while excluding unavailable OpenCode sources ([#72](https://github.com/opgginc/opencode-bar/pull/72), [#89](https://github.com/opgginc/opencode-bar/pull/89), [#95](https://github.com/opgginc/opencode-bar/pull/95)).\n- Added the `opencodebar` CLI with provider status/list/detail commands, JSON output support, and improved dual-percentage formatting ([#32](https://github.com/opgginc/opencode-bar/pull/32), [#92](https://github.com/opgginc/opencode-bar/pull/92)).\n- Added subscription-aware billing controls and safer cleanup behavior with per-provider plan settings and orphaned plan handling ([#68](https://github.com/opgginc/opencode-bar/pull/68)).\n- Improved auth and reliability: cookie-based Copilot authentication, auth source labels, dynamic OpenCode binary/auth path discovery, mixed-schema auth decoding, and stronger fallback handling ([#31](https://github.com/opgginc/opencode-bar/pull/31), [#55](https://github.com/opgginc/opencode-bar/pull/55), [#30](https://github.com/opgginc/opencode-bar/pull/30), [#26](https://github.com/opgginc/opencode-bar/pull/26), [#69](https://github.com/opgginc/opencode-bar/pull/69)).\n- Polished menu bar UX with status bar provider icons, compact icon width, aligned panel styling, clearer pace/wait messaging, and improved over-quota alert behavior ([#87](https://github.com/opgginc/opencode-bar/pull/87), [#80](https://github.com/opgginc/opencode-bar/pull/80), [#79](https://github.com/opgginc/opencode-bar/pull/79), [#54](https://github.com/opgginc/opencode-bar/pull/54), [#96](https://github.com/opgginc/opencode-bar/pull/96)).\n- Hardened update/release operations with Sparkle migration and relaunch fixes, x86 support, and repo-level pre-commit quality checks ([#21](https://github.com/opgginc/opencode-bar/pull/21), [#24](https://github.com/opgginc/opencode-bar/pull/24), [#39](https://github.com/opgginc/opencode-bar/pull/39), [#61](https://github.com/opgginc/opencode-bar/pull/61)).\n\n### Key Feature PRs\n- [#96](https://github.com/opgginc/opencode-bar/pull/96) Adjust overquota alert behavior (by [@kargnas](https://github.com/kargnas))\n- [#95](https://github.com/opgginc/opencode-bar/pull/95) Separate Claude accounts by email and disable unavailable OpenCode source (by [@kargnas](https://github.com/kargnas))\n- [#92](https://github.com/opgginc/opencode-bar/pull/92) Implement CLI formatter dual percentage display (by [@kargnas](https://github.com/kargnas))\n- [#91](https://github.com/opgginc/opencode-bar/pull/91) Fix Codex usage prediction percentage (by [@kargnas](https://github.com/kargnas))\n- [#89](https://github.com/opgginc/opencode-bar/pull/89) Fix Claude Sonnet usage reset (by [@kargnas](https://github.com/kargnas))\n- [#88](https://github.com/opgginc/opencode-bar/pull/88) Support Nano-GPT 60M monthly plan weekly token window (by [@Daltonganger](https://github.com/Daltonganger))\n- [#87](https://github.com/opgginc/opencode-bar/pull/87) Display provider icons in status bar text (by [@kargnas](https://github.com/kargnas))\n- [#85](https://github.com/opgginc/opencode-bar/pull/85) Add Brave/Tavily search quota tracking and refresh modes (by [@Daltonganger](https://github.com/Daltonganger))\n- [#83](https://github.com/opgginc/opencode-bar/pull/83) Replace hardcoded OpenCode path with dynamic binary discovery (by [@Shaglock](https://github.com/Shaglock))\n- [#81](https://github.com/opgginc/opencode-bar/pull/81) Align menu bar usage metrics with weekly priority (by [@kargnas](https://github.com/kargnas))\n- [#80](https://github.com/opgginc/opencode-bar/pull/80) Reduce status bar icon width on macOS menu bar (by [@kargnas](https://github.com/kargnas))\n- [#79](https://github.com/opgginc/opencode-bar/pull/79) Align status panel styling (by [@kargnas](https://github.com/kargnas))\n- [#77](https://github.com/opgginc/opencode-bar/pull/77) Add Codex Spark window grouping and fallback parsing (by [@kargnas](https://github.com/kargnas))\n- [#76](https://github.com/opgginc/opencode-bar/pull/76) Add Nano-GPT provider across app and CLI (by [@Daltonganger](https://github.com/Daltonganger))\n- [#75](https://github.com/opgginc/opencode-bar/pull/75) Add Gemini CLI auto-detection (by [@kargnas](https://github.com/kargnas))\n- [#74](https://github.com/opgginc/opencode-bar/pull/74) Add Codex LB account discovery to status bar menu (by [@kargnas](https://github.com/kargnas))\n- [#72](https://github.com/opgginc/opencode-bar/pull/72) Add Claude extra usage breakdown in UI and models (by [@kargnas](https://github.com/kargnas))\n- [#69](https://github.com/opgginc/opencode-bar/pull/69) Fix auth.json decoding for mixed provider schemas (by [@kargnas](https://github.com/kargnas))\n- [#68](https://github.com/opgginc/opencode-bar/pull/68) Fix orphaned subscription cleanup (by [@kargnas](https://github.com/kargnas))\n- [#67](https://github.com/opgginc/opencode-bar/pull/67) Group model quotas by reset window and add dividers (by [@kargnas](https://github.com/kargnas))\n- [#66](https://github.com/opgginc/opencode-bar/pull/66) Register Z.AI and Chutes providers in CLI (by [@kargnas](https://github.com/kargnas))\n- [#65](https://github.com/opgginc/opencode-bar/pull/65) Show Z.AI 5h and MCP quotas (by [@kargnas](https://github.com/kargnas))\n- [#63](https://github.com/opgginc/opencode-bar/pull/63) Render Gemini grouped models on separate rows (by [@kargnas](https://github.com/kargnas))\n- [#61](https://github.com/opgginc/opencode-bar/pull/61) Add x86 support (by [@kargnas](https://github.com/kargnas))\n- [#56](https://github.com/opgginc/opencode-bar/pull/56) Add opencode-gemini-auth support (by [@kargnas](https://github.com/kargnas))\n- [#55](https://github.com/opgginc/opencode-bar/pull/55) Add auth source labels and debug summary (by [@kargnas](https://github.com/kargnas))\n- [#54](https://github.com/opgginc/opencode-bar/pull/54) Fix used-up pace messaging and wait time formatting (by [@kargnas](https://github.com/kargnas))\n- [#51](https://github.com/opgginc/opencode-bar/pull/51) Add Synthetic quota provider (by [@ch1y1z1](https://github.com/ch1y1z1))\n- [#43](https://github.com/opgginc/opencode-bar/pull/43) Add Chutes AI provider support (by [@Daltonganger](https://github.com/Daltonganger))\n- [#49](https://github.com/opgginc/opencode-bar/pull/49) Add `~/.codex/auth.json` fallback for Codex native client (by [@kargnas](https://github.com/kargnas))\n- [#39](https://github.com/opgginc/opencode-bar/pull/39) Add pre-commit hooks (SwiftLint + action-validator) (by [@kargnas](https://github.com/kargnas))\n- [#34](https://github.com/opgginc/opencode-bar/pull/34) Add Z.AI Coding Plan provider support (by [@hellokiseokopgg](https://github.com/hellokiseokopgg))\n- [#32](https://github.com/opgginc/opencode-bar/pull/32) Add `opencodebar` CLI for provider usage queries (by [@kargnas](https://github.com/kargnas))\n- [#31](https://github.com/opgginc/opencode-bar/pull/31) Implement cookie-based Copilot authentication (by [@kargnas](https://github.com/kargnas))\n- [#30](https://github.com/opgginc/opencode-bar/pull/30) Fix dynamic OpenCode CLI binary search (by [@kargnas](https://github.com/kargnas))\n- [#26](https://github.com/opgginc/opencode-bar/pull/26) Add fallback paths for auth.json discovery (by [@kargnas](https://github.com/kargnas))\n- [#24](https://github.com/opgginc/opencode-bar/pull/24) Ensure Sparkle relaunches app after update (by [@kargnas](https://github.com/kargnas))\n- [#21](https://github.com/opgginc/opencode-bar/pull/21) Add app bundle migration for Sparkle updates (by [@kargnas](https://github.com/kargnas))\n- [#17](https://github.com/opgginc/opencode-bar/pull/17) Add error reporting UI for provider failures (by [@kargnas](https://github.com/kargnas))\n- [#16](https://github.com/opgginc/opencode-bar/pull/16) Rename app bundle from CopilotMonitor to OpenCode Bar (by [@kargnas](https://github.com/kargnas))\n- [#12](https://github.com/opgginc/opencode-bar/pull/12) OpenCode Bar v2.0.0 multi-provider monitoring release (by [@kargnas](https://github.com/kargnas))\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshot-subscription.png\" alt=\"OpenCode Bar Screenshot\" width=\"40%\"\u003e\n  \u003cimg src=\"docs/screenshot3.png\" alt=\"OpenCode Bar Screenshot\" width=\"40%\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eAutomatically monitor all your AI provider usage from OpenCode in real-time from the macOS menu bar.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/opgginc/opencode-bar/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/opgginc/opencode-bar?style=flat-square\" alt=\"Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/opgginc/opencode-bar/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/opgginc/opencode-bar?style=flat-square\" alt=\"License\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/platform-macOS%2013%2B-blue?style=flat-square\" alt=\"Platform\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/swift-5.9-orange?style=flat-square\" alt=\"Swift\"\u003e\n\u003c/p\u003e\n\n---\n\n## Installation\n\n### Homebrew (Easy)\n\n```bash\nbrew install --cask opgginc/tap/opencode-bar\n```\n\n### Download\n\nDownload the latest `.dmg` file from the [**Releases**](https://github.com/opgginc/opencode-bar/releases/latest) page.\n\n## Overview\n\n**OpenCode Bar** automatically detects and monitors all AI providers registered in your [OpenCode](https://opencode.ai) configuration. No manual setup required - just install and see your usage across all providers in one unified dashboard.\n\n### Supported Providers (Auto-detected from OpenCode)\n\n| Provider | Type | Key Metrics |\n|----------|------|-------------|\n| **OpenRouter** | Pay-as-you-go | Credits balance, daily/weekly/monthly cost |\n| **OpenCode Zen** | Pay-as-you-go | Daily history (30 days), model breakdown |\n| **GitHub Copilot Add-on** | Pay-as-you-go | Usage-based billing after exceeding quota |\n| **Claude** | Quota-based | 5h/7d usage windows, Sonnet/Opus breakdown |\n| **Codex** | Quota-based | Primary/Secondary quotas, plan type |\n| **Gemini CLI** | Quota-based | Per-model quotas, multi-account support with email labels and account ID details |\n| **Nano-GPT** | Quota-based | Weekly input tokens quota, USD/NANO balance |\n| **Kimi for Coding (Kimi K2.5)** | Quota-based | Usage limits, membership level, reset time |\n| **Z.AI Coding Plan** | Quota-based | Token/MCP quotas, model usage, tool usage (24h) |\n| **Brave Search** | Quota-based | Monthly search quota, reset schedule |\n| **Tavily** | Quota-based | Monthly search quota, plan usage |\n| **Synthetic** | Quota-based | 5h usage limit, request limits, reset time |\n| **Antigravity** | Quota-based | Local cache reverse parsing (`state.vscdb`), no localhost dependency |\n| **Chutes AI** | Quota-based | Daily quota limits (300/2000/5000), credits balance |\n| **GitHub Copilot** | Quota-based | Daily history, overage tracking |\n\n### OpenCode Plugins\n- **Antigravity/Gemini**\n  - `NoeFabris/opencode-antigravity-auth` (writes `~/.config/opencode/antigravity-accounts.json`)\n  - `jenslys/opencode-gemini-auth` (writes `google.oauth` in OpenCode `auth.json`)\n  - Gemini CLI OAuth creds (writes `~/.gemini/oauth_creds.json` for email/account ID metadata; overlaps are merged with Antigravity accounts)\n- **Claude**: `anomalyco/opencode-anthropic-auth`\n\n### Standalone tools\n- **Codex**: `Soju06/codex-lb` (writes `~/.codex-lb/`)\n\n### Other AI agents beyond OpenCode that supports auto-detection\n- **Codex**\n  - **Codex for Mac** - Auto-detected through `~/.codex/auth.json`\n  - **Codex CLI** - Auto-detected through `~/.codex/auth.json`\n- **Claude Code CLI** - Keychain-based authentication detection\n\n## Features\n\n### Automatic Provider Detection\n- **Zero Configuration**: Reads your OpenCode `auth.json` automatically\n- **Multi-path Support**: Searches `$XDG_DATA_HOME/opencode`, `~/.local/share/opencode`, and `~/Library/Application Support/opencode`\n- **Dynamic Updates**: New providers appear as you add them to OpenCode\n- **Smart Categorization**: Pay-as-you-go vs Quota-based providers displayed separately\n\n### Real-time Monitoring\n- **Menu Bar Dashboard**: View all provider usage at a glance\n- **Visual Indicators**: Color-coded progress (green → yellow → orange → red)\n- **Detailed Submenus**: Click any provider for in-depth metrics\n- **Auth Source Labels**: See where each account token was detected (OpenCode, VS Code, Keychain, etc.)\n- **Gemini Account Labels**: Shows `Gemini CLI (email)` when email is available, with fallback to `Gemini CLI #N`\n\n### Usage History \u0026 Predictions\n- **Daily Tracking**: View request counts and overage costs\n- **EOM Prediction**: Estimates end-of-month totals using weighted averages\n- **Add-on Cost Tracking**: Shows additional costs when exceeding limits\n\n### Subscription Settings (Quota-based Providers Only)\n- **Per-Provider Plans**: Configure your subscription tier for quota-based providers\n- **Cost Tracking**: Accurate monthly cost calculation based on your plan\n- **Orphaned Plan Cleanup**: Detect and reset stale subscription entries that no longer match accounts\n\n### Convenience\n- **Launch at Login**: Start automatically with macOS\n- **Parallel Fetching**: All providers update simultaneously for speed\n- **Auto Updates**: Seamless background updates via Sparkle framework\n\n## Development\n\n### Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/opgginc/opencode-bar.git\ncd opencode-bar\n\n# Build\nxcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \\\n  -scheme CopilotMonitor -configuration Debug build\n\n# Open the app (auto-detect path)\nopen \"$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -showBuildSettings 2\u003e/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1)/OpenCode Bar.app\"\n```\n\n**Requirements:**\n- macOS 13.0+\n- Xcode 15.0+ (for building from source)\n- [OpenCode](https://opencode.ai) installed with authenticated providers\n\n## Usage\n\n### Menu Bar App\n\n1. **Install OpenCode**: Make sure you have OpenCode installed and authenticated with your providers\n2. **Launch the app**: Run OpenCode Bar\n3. **View usage**: Click the menu bar icon to see all your provider usage\n4. **GitHub Copilot** (optional): Automatically detected via browser cookies (Chrome, Brave, Arc, Edge supported)\n\n### Command Line Interface (CLI)\n\nOpenCode Bar includes a powerful CLI for querying provider usage programmatically.\n\n#### Installation\n\n```bash\n# Option 1: Install via menu bar app\n# Click \"Install CLI\" from the Settings menu\n\n# Option 2: Manual installation\nbash scripts/install-cli.sh\n\n# Verify installation\nopencodebar --help\n```\n\n#### Commands\n\n```bash\n# Show all providers and their usage (default command)\nopencodebar status\n\n# List all available providers\nopencodebar list\n\n# Get detailed info for a specific provider\nopencodebar provider claude\nopencodebar provider gemini_cli\n\n# Output as JSON (for scripting)\nopencodebar status --json\nopencodebar provider claude --json\nopencodebar list --json\n```\n\n#### Table Output Example\n\n```bash\n$ opencodebar status\nProvider              Type             Usage       Key Metrics\n─────────────────────────────────────────────────────────────────────────────────\nClaude                Quota-based      77%         23/100 remaining\nCodex                 Quota-based      0%          100/100 remaining\nGemini CLI (user1@gmail.com) Quota-based      0%          100% remaining\nGemini CLI (user2@company.com) Quota-based    15%         85% remaining\nKimi for Coding       Quota-based      26%         74/100 remaining\nOpenCode Zen          Pay-as-you-go    -           $12.50 spent\nOpenRouter            Pay-as-you-go    -           $37.42 spent\n```\n\n#### JSON Output Example\n\n```bash\n$ opencodebar status --json\n{\n  \"claude\": {\n    \"type\": \"quota-based\",\n    \"remaining\": 23,\n    \"entitlement\": 100,\n    \"usagePercentage\": 77,\n    \"overagePermitted\": false\n  },\n  \"gemini_cli\": {\n    \"type\": \"quota-based\",\n    \"remaining\": 85,\n    \"entitlement\": 100,\n    \"usagePercentage\": 15,\n    \"overagePermitted\": false,\n    \"accounts\": [\n      {\n        \"index\": 0,\n        \"email\": \"user1@gmail.com\",\n        \"accountId\": \"100663739661147150906\",\n        \"remainingPercentage\": 100,\n        \"modelBreakdown\": {\n          \"gemini-2.5-pro\": 100,\n          \"gemini-2.5-flash\": 100\n        }\n      },\n      {\n        \"index\": 1,\n        \"email\": \"user2@company.com\",\n        \"accountId\": \"109876543210987654321\",\n        \"remainingPercentage\": 85,\n        \"modelBreakdown\": {\n          \"gemini-2.5-pro\": 85,\n          \"gemini-2.5-flash\": 90\n        }\n      }\n    ]\n  },\n  \"openrouter\": {\n    \"type\": \"pay-as-you-go\",\n    \"cost\": 37.42\n  }\n}\n```\n\n#### Use Cases\n\n- **Monitoring**: Integrate with monitoring systems to track API usage\n- **Automation**: Build scripts that respond to quota thresholds\n- **CI/CD**: Check provider quotas before running expensive operations\n- **Reporting**: Generate usage reports for billing and analysis\n\n#### Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Success |\n| 1 | General error |\n| 2 | Authentication failed |\n| 3 | Network error |\n| 4 | Invalid arguments |\n\n### Menu Structure\n\n```\n─────────────────────────────\nPay-as-you-go: $37.61\n  OpenRouter       $37.42    ▸\n  OpenCode Zen     $0.19     ▸\n─────────────────────────────\nQuota Status: $219/m\n  Copilot          0%        ▸\n  Claude: 60%, 100%          ▸\n  Codex            100%      ▸\n  Z.AI Coding Plan 99%       ▸\n  Gemini CLI (user1@gmail.com) 100% ▸\n─────────────────────────────\nPredicted EOM: $451\n─────────────────────────────\nRefresh (⌘R)\nAuto Refresh              ▸\nSettings                  ▸\n─────────────────────────────\nVersion 2.1.0\nQuit (⌘Q)\n```\n\n#### Menu Group Titles\n\n| Group | Format | Description |\n|-------|--------|-------------|\n| **Pay-as-you-go** | `Pay-as-you-go: $XX.XX` | Sum of all pay-as-you-go provider costs (OpenRouter + OpenCode Zen) |\n| **Quota Status** | `Quota Status: $XXX/m` | Shows total monthly subscription cost if any quota-based providers have subscription settings configured. If no subscriptions are set, shows just \"Quota Status\". |\n\n##### Status Bar Options\n\n- **Menu Bar Display**: Choose one of `Total Cost`, `Icon Only`, or `Only Show`.\n- **Critical Badge**: Toggle on/off to show or hide the critical-usage badge.\n- **Show Provider Icon**: Toggle on/off to append the selected provider icon in the status bar.\n\n\u003e **Status Bar Icon Behavior**:\n\u003e The primary OpenCode Bar status icon always stays visible. Provider icons are rendered as an additional icon next to the primary icon (not a replacement).\n\u003e\n\u003e **Gemini Icon Sizing**:\n\u003e Gemini uses a slightly larger icon size than other providers in both menu rows and the status bar to match the official visual balance.\n\n\u003e **Note**: Subscription settings are only available for quota-based providers. Pay-as-you-go providers do not have subscription options since they charge based on actual usage.\n\u003e\n\u003e **Terminology**:\n\u003e `Status Bar Percent` means the single representative percentage shown in the macOS top status bar text.\n\u003e `Dropdown Detail Percents` means the multi-window percentages shown in provider rows inside the opened dropdown menu.\n\u003e\n\u003e **Status Bar Percent Rule**: `Status Bar Percent` uses one fixed priority:\n\u003e `Weekly` → `Monthly` → `Daily` → `Hourly` → fallback aggregate.\n\u003e If multiple values exist in the same priority window, the highest value is shown (for example, Claude weekly picks max of 7d/Sonnet/Opus).\n\u003e In `Recent Quota Change Only`, provider selection is based on change, but the shown percentage is the provider's current priority-based usage.\n\u003e\n\u003e **Dropdown Detail Percents Rule**: top-level menu rows keep multi-window percentages when available.\n\n## How It Works\n\n1. **Token Discovery**: Reads authentication tokens from OpenCode's `auth.json` (with multi-path fallback)\n2. **Cookie Detection**: Finds GitHub Copilot sessions from Chrome, Brave, Arc, or Edge (with profile support)\n3. **Parallel Fetching**: Queries all provider APIs simultaneously\n4. **Smart Caching**: Falls back to cached data on network errors\n5. **Graceful Degradation**: Shows available providers even if some fail\n\n### Privacy \u0026 Security\n\n- **Local Only**: All data stays on your machine\n- **No Third-party Servers**: Direct communication with provider APIs\n- **Read-only Access**: Uses existing OpenCode tokens (no additional permissions)\n- **Browser Cookie Access**: GitHub Copilot reads session cookies from your default browser (read-only, no passwords stored)\n\n## Troubleshooting\n\n### \"No providers found\" or auth.json not detected\nThe app searches for `auth.json` in these locations (in order):\n1. `$XDG_DATA_HOME/opencode/auth.json` (if XDG_DATA_HOME is set)\n2. `~/.local/share/opencode/auth.json` (default)\n3. `~/Library/Application Support/opencode/auth.json` (macOS fallback)\n\n### GitHub Copilot not showing\n- Make sure you're signed into GitHub in a supported browser (Chrome, Brave, Arc, or Edge)\n- The app reads session cookies from browser profiles—no manual login required\n- Check that your browser has active GitHub cookies (try visiting github.com)\n\n### OpenCode CLI commands failing\nThe app dynamically searches for the `opencode` binary in:\n- Current PATH (`which opencode`)\n- Login shell PATH\n- Common install locations: `~/.opencode/bin/opencode`, `/usr/local/bin/opencode`, etc.\n\n## Contributing\n\nContributions are welcome! Please submit a Pull Request.\n\n### Development Setup\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. **Setup Git Hooks** (run once after clone):\n   ```bash\n   make setup\n   ```\n   This configures pre-commit hooks for:\n   - **SwiftLint**: Checks Swift code style on staged `.swift` files\n   - **action-validator**: Validates GitHub Actions workflow files\n4. Make your Changes\n5. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n   - Pre-commit hooks will automatically check your code\n   - Fix any violations or use `git commit --no-verify` to bypass (not recommended)\n6. Push to the Branch (`git push origin feature/AmazingFeature`)\n7. Open a Pull Request\n\n### Code Quality\n\nThis project uses SwiftLint and action-validator to maintain code quality:\n\n- **Pre-commit Hook**: Runs on `git commit` (setup via `make setup`)\n  - SwiftLint for `.swift` files\n  - action-validator for `.github/workflows/*.yml` files\n- **GitHub Actions**: Runs on all pushes and pull requests\n- **Manual Check**: `make lint` (or `make lint-swift`, `make lint-actions`)\n\n## License\n\nMIT License - See [LICENSE](LICENSE) file for details.\n\n## Related\n\n- [OpenCode](https://opencode.ai) - The AI coding assistant that powers this monitor\n- [GitHub Copilot](https://github.com/features/copilot)\n\n## Credits\n\n- [OP.GG](https://op.gg)\n- [Sangrak Choi](https://kargn.as)\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with tiredness for AI power users\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopgginc%2Fopencode-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopgginc%2Fopencode-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopgginc%2Fopencode-bar/lists"}