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 anthropic_api;
14pub mod cache;
15pub mod config;
16pub mod context;
17pub mod countdown;
18pub mod deepseek;
19pub mod error;
20pub mod format;
21pub mod grok;
22pub mod kilo;
23pub mod kimi;
24pub mod moonshot;
25pub mod novita;
26pub mod openai;
27pub mod openrouter;
28pub mod pacing;
29pub mod pango;
30pub mod theme;
31pub mod tooltip;
32pub mod tui;
33pub mod usage;
34pub mod vendor;
35pub mod waybar;
36pub mod widget;
37pub mod zai;
38
39pub use error::{AppError, Result};