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