Echo/Docs

CLI command

analytics

Read recent first-party web and mobile analytics events.

Invocation#

Shell
echo-cli analytics [days]

Inputs and output#

days defaults to 7 and must be an integer from 1 to 365. The result contains window_days, since, and bounded web and mobile arrays without user or anonymous identifiers.

State effect#

The command performs bounded SELECTs from web_analytics_events and mobile_analytics_events. It does not collect, rewrite, or attribute an event.

Refusals#

  • 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 a SELECT, the CLI prints the returned database error message to stderr and exits 1.