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 commandcode;
19pub mod config;
20pub mod context;
21pub mod countdown;
22pub mod cursor;
23pub mod deepseek;
24pub mod display;
25pub mod error;
26pub mod format;
27pub mod grok;
28/// Source-scanning helpers for structural guard tests. Test-only.
29#[cfg(test)]
30pub(crate) mod guard;
31pub mod jwt;
32pub mod kilo;
33pub mod kimi;
34pub mod kiro;
35pub mod minimax;
36pub mod moonshot;
37pub mod nous;
38pub mod novita;
39pub mod openai;
40pub mod opencode_go;
41pub mod openrouter;
42pub mod pacing;
43pub mod pango;
44pub mod report;
45pub mod safe_storage;
46pub mod serde_helpers;
47pub mod supergrok;
48pub mod theme;
49pub mod tooltip;
50pub mod tui;
51pub mod usage;
52pub mod vendor;
53pub mod waybar;
54pub mod widget;
55pub mod zai;
56
57pub use error::{AppError, Result};