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 active;
12pub mod anthropic;
13pub mod cache;
14pub mod config;
15pub mod countdown;
16pub mod deepseek;
17pub mod error;
18pub mod format;
19pub mod openai;
20pub mod openrouter;
21pub mod pacing;
22pub mod pango;
23pub mod theme;
24pub mod tooltip;
25pub mod tui;
26pub mod usage;
27pub mod vendor;
28pub mod waybar;
29pub mod widget;
30pub mod zai;
31
32pub use error::{AppError, Result};