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