How tddworks/claudebar works
ClaudeBar is a macOS menu-bar dashboard for AI coding quotas. Users enable providers; provider definitions collect usage, which the app presents with reset countdowns and alerts. The repository also supports daily usage, multi-account logins, extensions, themes, notch and Touch Bar displays, session hooks, and Notify! device publishing. The graph uses documented capabilities and indexed source references; several UI-to-domain runtime calls are not shown in the excerpts, so those links are marked unverified rather than asserted as inspected.
Main entry points: QuotaMonitor.swift Quota monitor · SettingsWindowView.swift Settings UI · Provider.swift Provider runtime · MenuContentView.swift Menu-bar UI
Components 21
App experience
- Menu-bar UI
Sources/App/Views/MenuContentView.swift - Settings UI
Sources/App/Views/SettingsWindow/SettingsWindowView.swift - Notch display
Sources/App/Notch/NotchWindowController.swift - Touch Bar
Sources/App/Views/TouchBar/TouchBarQuotaView.swift - Theme system
Sources/App/Theme/ThemeRegistry.swift
Provider collection
- Provider lineup
Modules/Providers/Sources/Providers.swift - Provider runtime
Modules/Providers/Sources/Provider.swift - Provider accounts
Modules/Providers/Sources/ProviderAccount.swift - Provider probes
Sources/Infrastructure - Data-source factory
Modules/DataSources/Sources/DataSources.swift - Fetch and map
Modules/DataSources/Sources/Internal - AI provider services
Usage and monitoring
- Quota model
Modules/Quotas/Sources/UsageQuota.swift - Quota monitor
Sources/Domain/Monitor/QuotaMonitor.swift - Daily usage
Sources/Infrastructure/Claude/ClaudeDailyUsageAnalyzer.swift
Optional integrations
- Extensions
Sources/Infrastructure/Extension - Session hooks
Sources/Infrastructure/Hooks/HookHTTPServer.swift - Notify publishing
Sources/Infrastructure/Notify/NotifyGatewayClient.swift - Notify! service
Persistence and transport
- Settings storage
Sources/Infrastructure/Storage/JSONSettingsRepository.swift
Other components
- Mac user
Connections 23
- Mac user → Menu-bar UI: views quotas
README.md - Mac user → Settings UI: configures providers
README.md - Menu-bar UI → Quota monitor: reads quotas
- Quota monitor → Provider lineup: refreshes providers
- Provider lineup → Provider runtime: creates providers
Modules/Providers/Sources/Providers.swift - Provider runtime → Data-source factory: creates data sources
Modules/Providers/Sources/Providers.swift - Data-source factory → Fetch and map: selects fetchers
Modules/DataSources/Sources/DataSources.swift - Provider probes → AI provider services: queries usage
- Provider runtime → Provider probes: collects provider data
- Provider runtime → Provider accounts: supports logins
Modules/Providers/Sources/Provider.swift - Provider accounts → Settings storage: persists account settings
- Fetch and map → Quota model: maps usage
- Quota monitor → Quota model: evaluates status
- Settings UI → Settings storage: reads and writes
- Settings storage → Settings UI: provides preferences
- Menu-bar UI → Theme system: uses appearance
- Quota monitor → Notch display: shows activity
- Quota monitor → Touch Bar: shows gauges
- Quota monitor → Daily usage: presents daily usage
- Settings UI → Extensions: configures extensions
- Settings UI → Session hooks: configures hooks
- Quota monitor → Notify publishing: publishes quota state
- Notify publishing → Notify! service: sends updates
Sources/Infrastructure/Notify/NotifyGatewayClient.swift