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