How oscard-06/fenn-ai_usage works
AI Usage for Fenn is a Windows taskbar and floating-notch plugin that aggregates live quotas across AI providers. Users link detected CLI credentials or configure tokens/custom JSON; Fenn events enter the plugin controller, which updates persistent account state, refreshes providers, and renders taskbar, popup, and notch views. Provider fetchers and parsers normalize quota data for display and cached recovery. README capabilities include per-counter settings, alerts, custom icons, and Antigravity statusLine sync. Some source excerpts are partial, so unverified subsystem links are omitted.
Main entry points: views.py Surface orchestrator · state.py Account and quota state · fetchers.py Provider fetchers · main.py Plugin controller
Components 17
Plugin runtime
- Plugin controller
main.py - Fenn plugin API
fenn.py
Accounts and state
- Account and quota state
ai_usage/state.py
Quota providers
- Normalized quota models
ai_usage/models.py - Provider fetchers
ai_usage/fetchers.py - Quota parsers
ai_usage/parsers.py - HTTP client
ai_usage/http_client.py
Display and settings
- Surface orchestrator
ai_usage/views.py - Canvas layouts
ai_usage/ui_canvas.py - Compact displays
ai_usage/compact_views.py - Account screens
ai_usage/account_views.py - Settings screens
ai_usage/settings_views.py
Local integrations
- CLI credentials and refresh
ai_usage/cli_auth.py - Antigravity statusLine
ai_usage/agy_statusline.py - Provider and custom icons
ai_usage/icons.py
Other components
- Fenn user
- Fenn host
Connections 25
- Fenn user → Fenn host: uses plugin
README.md - Fenn host → Fenn plugin API: dispatches events
fenn.py - Fenn plugin API → Plugin controller: runs handlers
main.py - Plugin controller → Account and quota state: updates state
main.py - Plugin controller → Surface orchestrator: requests render
main.py - Surface orchestrator → Fenn plugin API: builds surfaces
ai_usage/views.py - Surface orchestrator → Account screens: renders accounts
ai_usage/views.py - Surface orchestrator → Compact displays: renders compact
ai_usage/views.py - Surface orchestrator → Settings screens: renders settings
ai_usage/views.py - Surface orchestrator → Canvas layouts: builds layouts
ai_usage/views.py - Account and quota state → Provider fetchers: refreshes accounts
ai_usage/state.py - Provider fetchers → CLI credentials and refresh: reads credentials
ai_usage/fetchers.py - Provider fetchers → HTTP client: requests APIs
ai_usage/fetchers.py - Provider fetchers → Quota parsers: parses responses
ai_usage/fetchers.py - Quota parsers → Normalized quota models: creates windows
ai_usage/parsers.py - Provider fetchers → Normalized quota models: builds results
ai_usage/fetchers.py - Account and quota state → Normalized quota models: formats quotas
ai_usage/state.py - Account screens → Compact displays: reuses components
ai_usage/account_views.py - Settings screens → Compact displays: reuses components
ai_usage/settings_views.py - Account screens → Normalized quota models: formats account data
ai_usage/account_views.py - Settings screens → Account and quota state: reads settings
ai_usage/settings_views.py - Compact displays → Provider and custom icons: resolves icons
ai_usage/compact_views.py - Account and quota state → Provider and custom icons: manages custom icons
ai_usage/state.py - Account and quota state → CLI credentials and refresh: scans CLIs
ai_usage/state.py - Plugin controller → Antigravity statusLine: enables sync