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 binaries (`ai-usagebar`, `ai-usagebar-tui`, and on Windows
9//! `ai-usagebar-tray`) are thin: they parse CLI args, instantiate vendors,
10//! and hand off to a renderer in this crate.
11
12pub mod account;
13pub mod active;
14pub mod anthropic;
15pub mod anthropic_api;
16pub mod antigravity;
17pub mod cache;
18pub mod catalog;
19pub mod claude_desktop;
20pub mod commandcode;
21pub mod config;
22pub mod context;
23pub mod copilot;
24pub mod countdown;
25pub mod cursor;
26pub mod custom;
27pub mod deepseek;
28pub mod detect;
29pub mod display;
30pub mod error;
31pub mod format;
32pub mod grok;
33/// Source-scanning helpers for structural guard tests. Test-only.
34#[cfg(test)]
35pub(crate) mod guard;
36pub mod jwt;
37pub mod kilo;
38pub mod kimi;
39pub mod kiro;
40pub mod minimax;
41pub mod moonshot;
42pub mod nous;
43pub mod novita;
44pub mod openai;
45pub mod opencode_go;
46pub mod openrouter;
47pub mod outcome;
48pub mod pacing;
49pub mod pango;
50pub mod process;
51pub mod report;
52pub mod safe_storage;
53pub mod serde_helpers;
54pub mod supergrok;
55pub mod theme;
56pub mod tooltip;
57pub mod tray;
58pub mod tui;
59pub mod update;
60pub mod usage;
61pub mod vendor;
62pub mod waybar;
63pub mod widget;
64pub mod zai;
65
66pub use error::{AppError, Result};