How pinkpixel-dev/quota works
Quota’s desktop workflow connects provider accounts, retrieves and refreshes usage through a Rust/Tauri backend, and presents account summaries in a configurable dashboard and system tray. The README also documents separate CLI and VS Code extension products, represented as distinct branches. Provider-specific backend operations are grouped where the tree and Tauri command registration support them; unsampled implementation details and inter-provider relationships are not inferred.
Main entry points: lib.rs Command host · App.tsx Dashboard UI · main.rs CLI command · claude.rs Provider readers
Components 21
Desktop experience
- Dashboard UI
src/App.tsx - Usage display
src/components/UsageMetric.tsx - Tray summaries
src/data/trayRows.ts
Provider backend
- Tray integration
src-tauri/src/tray.rs - Command host
src-tauri/src/lib.rs - Provider accounts
src-tauri/src - OpenCode Go
src-tauri/src/opencode_go.rs - External URL opener
src-tauri/src/external_open.rs
Shared usage logic
- Provider readers
quota-core/src/claude.rs - Local credential paths
quota-core/src/local_paths.rs - Usage models
quota-core/src/usage.rs
Quota CLI
- CLI command
quota-cli/src/main.rs - CLI rendering
quota-cli/src/render.rs - Herdr output
quota-cli/src/herdr.rs
VS Code extension
- Extension host
quota-vscode/src/extension.ts - Usage panel
quota-vscode/src/panel.ts - Extension providers
quota-vscode/src/grokProvider.ts - Auth error handling
quota-vscode/src/authError.ts
Other components
- Desktop user
- CLI user
- VS Code user
Connections 20
- Desktop user → Dashboard UI: uses
README.md - Dashboard UI → Command host: invokes commands
- Command host → Provider accounts: registers commands
src-tauri/src/lib.rs - Command host → OpenCode Go: registers commands
src-tauri/src/lib.rs - Command host → Tray integration: sets up
src-tauri/src/lib.rs - Command host → External URL opener: registers opener
src-tauri/src/lib.rs - Dashboard UI → Usage display: renders metrics
src/App.tsx - Dashboard UI → Tray summaries: uses summaries
src/App.tsx - Tray summaries → Tray integration: formats tray rows
- Provider accounts → Provider readers: reads provider data
- Provider readers → Local credential paths: uses local paths
- Provider readers → Usage models: uses usage models
- CLI user → CLI command: runs usage
README.md - CLI command → Provider readers: uses shared logic
README.md - CLI command → CLI rendering: formats output
- CLI command → Herdr output: supports plugin output
- VS Code user → Extension host: uses
README.md - Extension host → Extension providers: loads providers
- Extension host → Usage panel: opens panel
- Extension providers → Auth error handling: maps auth failures
quota-vscode/src/grokProvider.ts