Skip to main content

systemprompt_cli/commands/analytics/shared/
mod.rs

1//! Cross-domain helpers shared by every analytics command.
2//!
3//! Re-exports CSV export utilities ([`export`]), reusable output/formatting
4//! types and number formatters ([`output`]), and time-range parsing and
5//! bucketing ([`time`]) so the per-domain command modules draw from one
6//! surface.
7
8pub mod export;
9pub mod output;
10pub mod time;
11
12pub use export::{
13    CsvBuilder, ensure_export_dir, export_single_to_csv, export_to_csv, resolve_export_path,
14};
15pub use output::{
16    BreakdownData, BreakdownItem, MetricCard, StatsSummary, TrendData, TrendPoint, format_change,
17    format_cost, format_number, format_percent, format_tokens,
18};
19pub use systemprompt_models::time_format::format_date_range;
20pub use time::{
21    format_duration_ms, format_period_label, format_timestamp, parse_duration, parse_since,
22    parse_time_range, parse_until, truncate_to_period,
23};