Skip to main content

ai_usagebar/
lib.rs

1//! ai-usagebar library — shared core for the Waybar widget and TUI binaries.
2//!
3//! The crate is organized by concern, not by binary:
4//! - low-level primitives (`cache`, `countdown`, `pacing`, `pango`, `theme`)
5//! - the vendor abstraction (`vendor`, `vendors::*`, `usage`)
6//! - bin-specific composition (`widget`, `tui`) which lives next to its binary
7//!
8//! The two binaries (`ai-usagebar` and `ai-usagebar-tui`) are thin: they parse
9//! CLI args, instantiate vendors, and hand off to a renderer in this crate.
10
11pub mod account;
12pub mod active;
13pub mod anthropic;
14pub mod anthropic_api;
15pub mod antigravity;
16pub mod cache;
17pub mod claude_desktop;
18pub mod config;
19pub mod context;
20pub mod countdown;
21pub mod cursor;
22pub mod deepseek;
23pub mod display;
24pub mod error;
25pub mod format;
26pub mod grok;
27/// Source-scanning helpers for structural guard tests. Test-only.
28#[cfg(test)]
29pub(crate) mod guard;
30pub mod kilo;
31pub mod kimi;
32pub mod kiro;
33pub mod minimax;
34pub mod moonshot;
35pub mod nous;
36pub mod novita;
37pub mod openai;
38pub mod opencode_go;
39pub mod openrouter;
40pub mod pacing;
41pub mod pango;
42pub mod report;
43pub mod safe_storage;
44pub mod supergrok;
45pub mod theme;
46pub mod tooltip;
47pub mod tui;
48pub mod usage;
49pub mod vendor;
50pub mod waybar;
51pub mod widget;
52pub mod zai;
53
54pub use error::{AppError, Result};