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