Windows & Linux port of ClaudeBar — a system tray app that monitors your AI assistant usage quotas in real time.
ClaudTray lives in the system tray and gives you an at-a-glance coloured indicator of your remaining quota for Claude Code and other AI tools — no browser, no manual checking. Runs natively on Windows 10/11 and on Linux (Wayland & X11).
| Provider | Data source | Windows tracked |
|---|---|---|
| Claude (claude.ai / Claude Code) | Anthropic OAuth API (token via claude setup-token) |
Session (5 h), Weekly (7 d), Opus (7 d) |
| GitHub Copilot | Local rate-limit snapshots / API token | Monthly tokens |
| Codex | Local rate-limit snapshots | Monthly tokens |
| Antigravity | Local rate-limit snapshots | Monthly tokens |
| OpenRouter | API key (optional) | Remaining credits |
| Gemini (Google AI Studio) | API key (optional) | Available models |
| Ollama | Local API | Installed / loaded models |
Any provider can be hidden from the dashboard in Settings — hidden providers are not polled and don't affect the tray icon.
- Colour-coded tray icon — green (>50%), yellow (20–50%), red (<20%), grey (depleted / no data)
- Tooltip shows session and weekly percentages at a glance
- Popover dashboard — click the tray icon for a detailed panel with per-provider cards and reset countdowns
- Choose your providers — toggle which providers appear on the dashboard from Settings
- Auto-refresh — every 60 s in the background, every 5 s while the dashboard is open
- Dark / Light / System theme — follows the OS theme, switchable from the dashboard
- Single instance — a second launch exits immediately instead of duplicating the tray icon
- Windows: no dependencies — static CRT; WebView2 is bundled or auto-installed (Windows 11 always has it); per-user install, no admin rights required
- Linux: native Wayland support — the dashboard is a layer-shell popout (Hyprland, niri, KDE, GNOME…), the tray is a StatusNotifierItem, notifications go over D-Bus; falls back to a regular window on X11
winget install VictorMagne.ClaudTrayThe package is submitted to the winget-pkgs community repository. Approval may take a few days after each release.
scoop bucket add victor-magne https://github.com/Victor-Magne/scoop-bucket
scoop install claudtrayDownload ClaudTray_Setup_<version>.exe from the Releases page and run it. The installer:
- Does not require administrator rights (installs to
%LocalAppData%\ClaudTray) - Optionally adds ClaudTray to Windows startup
- Automatically installs the WebView2 Runtime if it is missing (Windows 10 only — Windows 11 ships with it)
Build and install a pacman-managed package from the release tarball using the PKGBUILD shipped in this repo:
curl -LO https://raw.githubusercontent.com/Victor-Magne/claudtray/master/packaging/arch/PKGBUILD
makepkg -si # fetches the release tarball, builds and installsRuntime dependencies: gtk3, webkit2gtk-4.1, gtk-layer-shell (pulled in automatically). The tray icon needs a StatusNotifier host — KDE and most bars (Waybar, DankMaterialShell, …) have one; on GNOME install the AppIndicator extension.
Alternatively, build manually from source — see Building from source below.
ClaudTray uses an OAuth token that you provide explicitly — it never reads Claude Code's own credential store. Generate a token with:
claude setup-token
then paste it into Settings → Token Claude in the dashboard. The token is
stored encrypted (DPAPI on Windows, ChaCha20-Poly1305 on Linux) and used only to
call Anthropic's usage endpoint, which reports the utilization percentage for
each rolling window. It is never transmitted anywhere other than Anthropic's own API.
You can also set the token via environment variable (useful for testing):
$env:CLAUDE_CODE_OAUTH_TOKEN = "sk-ant-oat01-..."Copilot, Codex, and Antigravity usage is read from local rate-limit snapshot files that each tool writes to disk. ClaudTray inspects running processes and known file paths to find active sessions.
All tokens are optional and entered in Settings (⚙ in the dashboard). Each one is stored encrypted (DPAPI on Windows, ChaCha20-Poly1305 on Linux) and only ever sent to its own provider's API.
| Field in Settings | Where to get it | Format |
|---|---|---|
| Token Claude | Run claude setup-token in a terminal (requires Claude Code logged in) and copy the token it prints |
sk-ant-oat01-… |
| Token GitHub (Copilot) | github.com/settings/tokens → Generate new token (classic) with the copilot / read:user scope |
ghp_… |
| API Key OpenRouter | openrouter.ai/keys → Create Key | sk-or-… |
| API Key Gemini | aistudio.google.com/app/apikey → Create API key | AIza… |
The "Obter ↗" button next to each field opens the corresponding page in your browser. Codex, Antigravity and Ollama need no token — they are read from local files / the local API.
| Colour | Meaning |
|---|---|
| Green | More than 50% remaining |
| Yellow | 20–50% remaining |
| Red | Less than 20% remaining |
| Grey | Depleted or no data found |
The icon shows the worst status across all active providers.
Prerequisites: Rust (stable, MSVC toolchain), Windows 10/11, and Inno Setup 6 (only to build the installer).
git clone https://github.com/Victor-Magne/claudtray.git
cd claudtray
# Build the release binary (static CRT, no MSVC Redist needed)
cargo build --release
# Run directly
.\target\release\claudtray.exe
# Build the installer (requires Inno Setup 6)
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer.iss
# Output: installer_output\ClaudTray_Setup_<version>.exesudo pacman -S --needed gtk3 webkit2gtk-4.1 gtk-layer-shell
git clone https://github.com/Victor-Magne/claudtray.git
cd claudtray
cargo build --release
./target/release/claudtrayOn Debian/Ubuntu the equivalent packages are libgtk-3-dev, libwebkit2gtk-4.1-dev and libgtk-layer-shell-dev.
Set CLAUDTRAY_DUMP=1 to write a JSON snapshot to the temp dir (%TEMP%\claudtray_snapshot.json on Windows, /tmp/claudtray_snapshot.json on Linux) and exit without showing any UI — handy for checking what the app sees:
$env:CLAUDTRAY_DUMP = "1"; .\target\release\claudtray.exe # Windows
CLAUDTRAY_DUMP=1 ./target/release/claudtray # Linuxsrc/
main.rs — Event loop, tray wiring, single-instance lock
model.rs — Snapshot / ProviderSnapshot / WindowUsage types
monitor.rs — QuotaMonitor: orchestrates all providers
state.rs — Persisted app state (theme, tokens, hidden providers)
secret.rs — Credential encryption (DPAPI on Windows, ChaCha20 on Linux)
renderer.rs — Dynamic tray icon (coloured ring, RGBA)
window.rs — Webview dashboard popover (WebView2 / webkit2gtk, layer-shell)
tray_linux.rs — Linux tray (ksni StatusNotifierItem)
providers/
mod.rs — Provider trait
claude.rs — Anthropic OAuth usage API
copilot.rs — GitHub Copilot local snapshots
codex.rs — Codex local snapshots
antigravity.rs — Antigravity local snapshots
openrouter.rs — OpenRouter credits API
gemini.rs — Google AI Studio models API
ollama.rs — Ollama local API
http.rs — Shared HTTP agent (ureq)
assets/
claudtray.ico
MicrosoftEdgeWebview2Setup.exe — WebView2 bootstrapper (~1.6 MB)
installer.iss — Inno Setup script
packaging/
winget/ — winget manifest templates
scoop/ — Scoop manifest template
arch/ — PKGBUILD + .desktop + icon (AUR)
After each release, update the version and SHA256 in:
packaging/winget/VictorMagne.ClaudTray.installer.yaml→ submit PR to microsoft/winget-pkgspackaging/scoop/claudtray.json→ push to your Scoop bucket repopackaging/arch/PKGBUILD— bumppkgverand refreshsha256sumswith the hash of the new tag tarball
The SHA256 of the Windows installers is printed in the GitHub release notes.
Pull requests are welcome. For significant changes, open an issue first.
This is a Windows & Linux port of the original macOS ClaudeBar by @tddworks. The provider logic, colour thresholds, and dashboard design follow the original as closely as possible.
- Original macOS app: tddworks/ClaudeBar
- Built with tao, wry, tray-icon (Windows), ksni (Linux), and ureq
MIT — see LICENSE.