cmd_usage/ocuse/mod.rs
1// The ocuse half of the cmduse crate: OpenCode Go/Zen usage.
2//
3// Same shape as cmduse, different source. cmduse asks CommandCode's account API
4// for credits and windows; here the window figures come from OpenCode Go's own
5// usage endpoint when the account has a Go key (see [`api`]) — the numbers the
6// console shows. Everything else is derived from opencode's own store plus the
7// docs catalogue in core/zen.json.
8//
9// The store alone cannot reproduce the account's windows: the server's 5-hour
10// window is a block with its own reset instant, its week is Monday-anchored, its
11// month is the subscription anniversary, and it meters with its own price basis.
12// So the local derivation is a fallback, not the primary source.
13pub mod api;
14pub mod cli;
15pub mod db;
16pub mod mcp;
17pub mod render;
18pub mod window;
19pub mod zen;
20
21pub use cli::run;
22pub use render::{render_json, render_text, statusline_template};
23pub use window::{build, Report, Totals, LOOKBACK_SECS};
24pub use zen::catalog;