Supported Providers
CodexBar tracks usage for the following providers:- Codex - OpenAI’s coding assistant with CLI, OAuth, and web dashboard support
- Claude - Anthropic’s Claude with OAuth API, browser cookies, and CLI fallback
- Cursor - Browser session cookies for plan and usage tracking
- Gemini - OAuth-backed quota API using Gemini CLI credentials
- Copilot - GitHub device flow with Copilot internal usage API
- Other Providers - z.ai, Kimi, Kilo, Kimi K2, Kiro, Vertex AI, Augment, Amp, JetBrains AI, OpenRouter, Antigravity, and Droid/Factory
Authentication Methods
Different providers use different authentication approaches:CLI-based Authentication
CLI-based Authentication
Providers like Codex and Claude can use local CLI tools:
- Automatically uses credentials from installed CLI (
codex,claude,gemini) - No additional setup needed if CLI is already authenticated
- Preferred method for app-based workflows
OAuth Authentication
OAuth Authentication
Providers like Claude and Gemini support OAuth:
- Uses OAuth tokens from CLI credentials or device flow
- Automatic token refresh when expired
- Most reliable for long-term usage tracking
Browser Cookies
Browser Cookies
API Token
API Token
Some providers use API keys:
- Stored in
~/.codexbar/config.jsonor environment variables - Configured via Settings → Providers → [Provider]
- No browser access required
Local Probe
Local Probe
Providers like Antigravity and JetBrains AI read local data:
- No external authentication needed
- Reads from local language servers or IDE configuration files
- Privacy-focused, fully offline
Data Sources
Fetch Strategies
Each provider can use one or more fetch strategies, typically with automatic fallback:| Strategy | Description | Examples |
|---|---|---|
| CLI RPC | JSON-RPC over stdin/stdout | Codex (primary) |
| CLI PTY | Interactive terminal session | Codex, Claude (fallback) |
| OAuth API | OAuth-backed REST API | Claude, Gemini, Vertex AI |
| Web API | Browser cookies + REST API | Claude, Cursor, Droid/Factory |
| API Token | Token-based API | z.ai, Copilot, OpenRouter |
| Local Probe | Local file/server probe | Antigravity, JetBrains AI |
| Web Dashboard | WebView scraping | Codex (optional) |
Source Labels
CodexBar displays the active source in debug mode:codex-cli- Codex CLI RPC/PTYopenai-web- OpenAI web dashboardoauth- OAuth APIweb- Web API via cookiesapi- API tokencli- CLI commandlocal- Local probe
Cookie Management
Automatic Cookie Import
For providers that support browser cookies:- Enable the provider in Settings → Providers
- Set Cookie source to “Automatic” (default)
- CodexBar imports cookies from your browsers in this order:
- Safari:
~/Library/Cookies/Cookies.binarycookies - Chrome/Chromium:
~/Library/Application Support/Google/Chrome/*/Cookies - Firefox:
~/Library/Application Support/Firefox/Profiles/*/cookies.sqlite
- Safari:
Cookie Caching
Browser cookies are cached in Keychain (com.steipete.codexbar.cache) with provider-specific account names like cookie.codex, cookie.claude, etc. Cached cookies are reused until the session is invalid, reducing Keychain prompts.
Manual Cookie Entry
If automatic import doesn’t work:- Open your browser’s Developer Tools (F12 or Cmd+Option+I)
- Go to the provider’s website and log in
- Copy the
Cookie:header from a network request - Paste it in Settings → Providers → [Provider] → Cookie source → Manual
Status Page Integration
Several providers support status page monitoring:- Codex - Statuspage.io (OpenAI)
- Claude - Statuspage.io (Anthropic)
- Cursor - Statuspage.io (Cursor)
- Copilot - Statuspage.io (GitHub)
- Gemini/Antigravity - Google Workspace incidents (Gemini product)
- Droid/Factory - status.factory.ai
- OpenRouter - status.openrouter.ai
Local Cost Usage
CodexBar can scan local log files to compute token costs for:- Codex -
~/.codex/sessions/**/*.jsonl(last 30 days) - Claude -
~/.config/claude/projects/**/*.jsonlor~/.claude/projects/**/*.jsonl - Vertex AI - Claude logs filtered to Vertex AI entries (model name format with
@)
~/Library/Caches/CodexBar/cost-usage/ and refreshed with a 60s minimum interval.
Privacy & Security
- On-device parsing: All data parsing happens locally on your Mac
- No password storage: CodexBar never stores passwords
- Keychain security: Tokens and cached cookies are stored in macOS Keychain
- Opt-in browser cookies: Browser cookie import requires Full Disk Access and is opt-in
- No telemetry: CodexBar does not send usage data to external services
Next Steps
Configure a Provider
Set up authentication for your preferred provider
Author a New Provider
Learn how to add support for a new provider
