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