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