CLI command
reliability
Aggregate recent completed and failed account actions by platform and external service.
Invocation#
echo-cli reliability [days]Inputs and output#
days is optional, defaults to 7, and must be an integer from 1 to 365.
The command reads at most 5,000 completed or failed action logs since the computed timestamp and writes one indented JSON object. The object contains window_days, since, log_count, platforms, services, and checked_at. Platform and service entries include completed and failed counts; costs are summed by service, and each entry retains at most 10 recent errors.
State effect#
The command performs one bounded SELECT from account_action_logs and aggregates the rows in memory. It does not retry actions, change account status, update logs, charge a service, or trigger generation.
Refusals#
- A days value outside the inclusive 1–365 range or a non-integer prints exactly "days must be an integer from 1 to 365" to stderr and exits 1.
- Without NEXT_PUBLIC_SUPABASE_URL it prints exactly "NEXT_PUBLIC_SUPABASE_URL is not configured" to stderr and exits 1.
- After the URL is present, without SUPABASE_SERVICE_ROLE_KEY it prints exactly "SUPABASE_SERVICE_ROLE_KEY is not configured" to stderr and exits 1.
- If Supabase refuses the SELECT, the CLI prints the returned database error message to stderr and exits 1.