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 outcome;
43pub mod pacing;
44pub mod pango;
45pub mod report;
46pub mod safe_storage;
47pub mod serde_helpers;
48pub mod supergrok;
49pub mod theme;
50pub mod tooltip;
51pub mod tui;
52pub mod usage;
53pub mod vendor;
54pub mod waybar;
55pub mod widget;
56pub mod zai;
57
58pub use error::{AppError, Result};