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//!
8//! Copyright (c) systemprompt.io — Business Source License 1.1.
9//! See <https://systemprompt.io> for licensing details.
10
11pub mod export;
12pub mod output;
13pub mod time;
14
15pub use export::{
16    CsvBuilder, ensure_export_dir, export_single_to_csv, export_to_csv, resolve_export_path,
17};
18pub use output::{
19    BreakdownData, BreakdownItem, MetricCard, StatsSummary, TrendData, TrendPoint, format_change,
20    format_cost, format_number, format_percent, format_tokens,
21};
22pub use systemprompt_models::time_format::format_date_range;
23pub use time::{
24    format_duration_ms, format_period_label, format_timestamp, parse_duration, parse_since,
25    parse_time_range, parse_until, truncate_to_period,
26};