opencode-bar

by opggincVerified

Effortless token usage tracker for OpenCode

298
Stars
3
Forks
Swift
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/opgginc/opencode-bar

Getting Started

Guides for using skills like opencode-bar.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

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.json and ~/.opencode/projects/*/openai-codex-accounts.json

  • Also understands plugin-managed OpenCode auth.json fields such as idToken, accountIdOverride, and organizationIdOverride

  • Antigravity/Gemini

  • NoeFabris/opencode-antigravity-auth (writes ~/.config/opencode/antigravity-accounts.json)

  • jenslys/opencode-gemini-auth (writes google.oauth in OpenCode auth.json)

  • Gemini CLI OAuth creds (writes ~/.gemini/oauth_creds.json for 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 (copilot provider entry)

  • Copilot CLI - Auto-detected through macOS Keychain (github.com entries)

  • VS Code / Cursor - Auto-detected from ~/.config/github-copilot/hosts.json and ~/.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.json plus ~/.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.json automatically

  • 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 to Gemini 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-plan in auth.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_count and current_weekly_usage_count behave as remaining counts despite their names, so OpenCode Bar calculates used percent as `total - remaini

Frequently Asked Questions

What is opencode-bar?

opencode-bar is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by opgginc. Effortless token usage tracker for OpenCode. It has 298 GitHub stars.

Is opencode-bar safe to use?

Yes. opencode-bar passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install opencode-bar?

Clone the repository with "git clone https://github.com/opgginc/opencode-bar" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is opencode-bar written in?

opencode-bar is primarily written in Swift. It is open-source under opgginc on GitHub, so you can review or fork the full source.

Are there alternatives to opencode-bar?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh opencode-bar against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details