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