A tiny always-on-top desktop widget that monitors your GLM Coding Plan quota — the 5-hour rolling window and the weekly allowance — so you don't get blindsided by a rate limit mid-session. Built with Avalonia 12 / .NET 10. Cross-platform (Windows / macOS / Linux).
English · 中文
- Nested quota rings — outer ring = weekly allowance, inner ring = 5-hour rolling window, animated
- Auto-refresh — clickable refresh button plus automatic refresh every few minutes
- Light / Dark / System theme — Anthropic-style palette, with a card opacity slider so it doesn't block your desktop
- Bilingual UI — Chinese / English toggle
- Start-on-login — optional autostart (Windows registry / macOS LaunchAgent / Linux autostart)
- Quota notifications — optional desktop notification when a quota crosses an exhaustion threshold (default 80% used, configurable)
- Movable card — right-click for refresh / settings / quit; drag to move (position remembered)
Reads quota from the GLM Coding Plan monitor endpoint (GET /api/monitor/usage/quota/limit) using your Coding Plan API key — the same call the official glm-plan-usage plugin makes. Two nested rings: outer = weekly, inner = 5-hour window. Clickable refresh button; auto-refresh every few minutes.
Settings & API key live under %APPDATA%\BrainFuel\ (Windows) / ~/.config/BrainFuel/ (Linux) / ~/Library/Application Support/BrainFuel/ (macOS).
| Dependency | Purpose / Version |
|---|---|
| .NET 10 SDK | Runtime / build target |
| Avalonia 12 | Cross-platform UI framework |
| Windows / macOS / Linux | Supported desktop platforms |
git clone https://github.com/turinglambdaai/brainfuel.git
cd brainfueldotnet runOn first launch, paste your GLM Coding Plan key in the settings dialog.
If
dotnet build/restorecan't reach nuget.org (restricted networks), restore from the local package cache instead:dotnet restore --ignore-failed-sources
Option A — download a prebuilt exe from Releases. The release workflow builds self-contained single-file exes for win-x64, osx-arm64, and linux-x64 — no .NET install needed on the target. (A manual run from the Actions tab also produces downloadable artifacts.)
Option B — build locally:
./publish.ps1 # win-x64 (default)
./publish.ps1 osx-arm64 # macOS Apple Silicon
./publish.ps1 linux-x64 # LinuxOutput goes to publish/<rid>/.
brainfuel/
├── App.axaml(.cs) # Application definition / DI container
├── Program.cs # Entry point
├── MainWindow.axaml(.cs) # Main widget window (quota rings)
├── NotificationWindow.axaml(.cs) # Desktop notification window
├── SettingsWindow.axaml(.cs) # Settings + API key dialog
├── Controls/
│ └── UsageRing.cs # Reusable quota-ring control
├── Services/
│ ├── GlmUsageClient.cs # GLM Coding Plan quota API client
│ ├── SettingsService.cs # Settings / API key persistence
│ ├── AutoStartService.cs # Start-on-login (Win/macOS/Linux)
│ ├── SingleInstanceActivation.cs # Single-instance guard
│ ├── Strings.cs # Localized strings
│ └── UsageModels.cs # Quota data models
├── ViewModels/
│ └── MainViewModel.cs # MVVM view model
├── publish.ps1 # Local self-contained build script
└── BrainFuel.csproj # Project file
Licensed under the MIT License.