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 ollama;
45pub mod openai;
46pub mod opencode_go;
47pub mod openrouter;
48pub mod outcome;
49pub mod pacing;
50pub mod pango;
51pub mod process;
52pub mod report;
53pub mod safe_storage;
54pub mod serde_helpers;
55pub mod supergrok;
56pub mod theme;
57pub mod tooltip;
58pub mod tray;
59pub mod tui;
60pub mod update;
61pub mod usage;
62pub mod vendor;
63pub mod waybar;
64pub mod widget;
65pub mod zai;
66
67pub use error::{AppError, Result};