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