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