Skip to content
 
 

Repository files navigation

Win-CodexBar

Simplified Chinese

Win-CodexBar is a Windows system-tray app for keeping AI coding-tool usage visible without opening a dozen dashboards. It ports the spirit of CodexBar to a Tauri + React desktop shell backed by shared Rust provider logic.

Win-CodexBar tray panel showing provider usage cards Win-CodexBar Providers settings page

Highlights

  • 49 providers including Codex, Claude, Copilot, OpenRouter, Cursor, Gemini, DeepSeek, MiniMax, Kiro, Antigravity, Groq, and more.
  • Tray-first workflow with a compact provider grid, usage cards, refresh action, settings shortcut, and quit control.
  • Provider settings for source selection, credentials, cookie import, token accounts, API keys, regions, and tray-display preferences.
  • Windows credential protection for app-managed API keys, manual cookies, and token accounts, using user-scoped DPAPI where available.
  • Browser cookie import for Chrome, Edge, Brave, and Firefox, kept opt-in per provider.
  • Installed local CLI for scripting usage, cost, config, diagnostics, and loopback integrations.
  • Installer + portable builds with WebView2 runtime bootstrap, VC++ runtime bootstrap, and SHA-256 checksum files.

What's Different in This Fork

This fork adds provider-specific improvements beyond the upstream Windows port, with the largest changes focused on MiniMax China Mainland region support:

MiniMax — CN Region API Usage

  • API endpoint switched to /v1/token_plan/remains — no longer requires group_id; authenticates purely with a Bearer API key. This endpoint returns token-plan balance directly and is more reliable than the old billing-history approach.
  • Region-aware routing — separates Global (platform.minimax.io) and China Mainland (platform.minimaxi.com) at every layer:
    • API base URLs, browser-cookie domains, billing-history endpoints, and dashboard URLs are all region-scoped
    • CN billing data is fetched from www.minimaxi.com/account/amount (distinct from the web console host)
  • Browser cookie import for CN — cookies can now be imported from platform.minimaxi.com for China-Mainland accounts, with proper parent-domain host-key extraction
  • Regional domain mapping fixed — the previous version had Global and CN domains swapped; this fork corrects the mapping so each region hits the right endpoints

Z.ai / BigModel

  • China Mainland routing — Z.ai provider routes CN users through the BigModel API automatically based on region setting
  • Response parsing hardening — added usage field alias and percentage field support for BigModel's API response format, which differs from the upstream Z.ai schema

Claude

  • OAuth credential lookup fix — resolved an issue where Claude OAuth credentials could fail to load on Windows
  • Windows tray launch fix — fixed startup race conditions affecting the tray icon on first launch

Browser Cookie Improvements

  • Parent-domain host keys — cookie extraction now includes parent-domain entries, fixing cases where browsers store cookies under minimaxi.com rather than platform.minimaxi.com
  • Import diagnostics — added detailed diagnostics for browser cookie imports to surface extraction issues

UI/UX Polish

  • Floatbar transparency fix on Windows
  • Settings credential button no longer wraps on narrow panes
  • Compact surface layout for smaller Windows screens

Install

Install with Windows Package Manager:

winget install Finesssee.Win-CodexBar

Or download the latest installer/portable build from GitHub Releases.

  • Installer: CodexBar-<version>-Setup.exe
  • Portable: CodexBar-<version>-portable.exe
  • Checksums: each release includes .sha256 files

Winget distribution is approved through microsoft/winget-pkgs. New versions can take a little time to appear because every Winget update is pinned to a specific release URL and installer hash.

First Run

  1. Launch CodexBar from the Start Menu or portable executable.
  2. Click the tray icon to open the usage panel.
  3. Open Settings -> Providers.
  4. Enable the providers you use.
  5. Add the matching credential type: OAuth/device login, API key, browser cookies, local CLI login, or token account.

For Claude, browser cookies/sessionKey are preferred because they match Claude's settings-page usage. OAuth and CLI stay available as fallbacks. For CLI-based providers such as Codex and Gemini, sign in with the provider CLI first.

Latest Release

v0.33.2 fixes tray-panel dismissal so the popover closes on focus loss or Escape, without immediately reopening from the same tray click.

See the full history in CHANGELOG.md.

Supported Providers

Provider matrix
Provider Auth Tracks
Codex OAuth / CLI Session, Weekly, Credits
Claude Cookies / OAuth fallback / CLI fallback Session (5h), Weekly
Cursor Cookies Plan, Usage, Billing
Factory Cookies Usage
Gemini gcloud OAuth Quota
Copilot GitHub Device Flow / gh CLI / legacy token Plan usage, Chat
Antigravity Local LSP Usage, Per-model quotas
z.ai API Token Quota
MiniMax API / Cookies Usage, Billing Summary
Kiro Cookies / CLI Monthly Credits, Overage
Vertex AI gcloud OAuth Cost
Augment Cookies Credits
OpenCode Local Config Usage
Kimi Cookies 5h Rate, Weekly
Kimi K2 API Key Credits
Amp Cookies Usage
Warp Local Config Usage
Ollama Cookies / API Key Usage, Cloud Models, Pace windows
Azure OpenAI API Key Deployment
T3 Chat Cookies / cURL Base, Overage
OpenRouter API Key Credits
Synthetic API Key / Config Usage, Credits
JetBrains AI Local Config Usage
Alibaba Cookies Usage
Alibaba Token Plan Cookies Token Plan Credits, Reset date
NanoGPT API Key Credits
Infini API Key Session, Weekly, Quota
Perplexity Cookies Credits, Plan
Abacus AI Cookies Credits
Mistral Cookies Billing, Usage
OpenCode Go Cookies Usage, Zen Balance
Kilo API Key / CLI Usage
AWS Bedrock AWS CLI Profile Cost
Codebuff API Key / Local Config Credits, Weekly
DeepSeek API Key Balance, Usage summaries, Cost
Windsurf Local Cache Daily, Weekly
Manus Cookies Credits, Refresh Credits
Xiaomi MiMo Cookies Balance, Token Plan
Doubao API Key Request Limits
Command Code Cookies Monthly Credits, Purchased Credits
Crof API Key Credits, Request Quota
StepFun Oasis Token 5h, Weekly, Token refresh
Venice API Key USD / DIEM Balance
OpenAI Admin API / API Key Usage, Requests, Project-scoped cost, Credit Balance
Grok Cookies / auth.json Billing
ElevenLabs API Key Subscription Credits, Voice Slots
Deepgram API Key Project Usage
Groq API Key Enterprise Metrics
LLM Proxy API Key Quota Stats

Build From Source

# Prerequisites: Node.js + pnpm. Rust and MinGW are installed by the script when needed.
git clone https://github.com/Finesssee/Win-CodexBar.git
cd Win-CodexBar
.\dev.ps1

Useful dev flags:

.\dev.ps1 -Release      # optimized build
.\dev.ps1 -SkipBuild    # relaunch the last build

CLI examples:

codexbar --help
codexbar diagnose --pretty
codexbar usage -p claude
codexbar usage -p all
codexbar cost -p codex

Installer builds include codexbar.exe as the console CLI and codexbar-desktop.exe as the tray app. Start Menu shortcuts launch the desktop app; terminal commands use codexbar.exe.

Release Builds

For local Windows release builds, use the cached release builder:

.\scripts\windows-release-build.ps1 -Ref v0.33.2 -SmokeInstall

The script builds the real Tauri release binary plus the console CLI, verifies signed installer dependencies, packages with Inno Setup, writes installer/portable assets, writes SHA-256 sidecars, and can run a silent install/uninstall smoke test.

More release automation notes live in docs/release/ci-cd.md.

Privacy

  • On-device by default: provider data is read from known local paths or provider APIs you configure.
  • Opt-in cookies: browser-cookie extraction only runs for providers you enable.
  • Protected secrets: API keys, manual cookies, and token accounts use the secure-file layer; Windows uses user-scoped DPAPI where available.
  • Safe diagnostics: diagnostics expose provider/source/status metadata only, never raw cookies, API keys, bearer tokens, or OAuth values.
  • Verified updates: installer downloads require a GitHub SHA-256 digest and are re-verified immediately before apply.

Docs

Topic Link
Building from source extra-docs/BUILDING.md
WSL setup and auth tips extra-docs/WSL.md
Browser cookie details extra-docs/COOKIES.md

Credits

License

MIT, same as the original CodexBar.

About

Show usage stats for OpenAI Codex and Claude Code, without having to login. But for Window-Native

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages