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