Analytics CLI reference
Source: @socra/analytics-cli@0.1.0.
This reference includes every command, argument, and option declared by this released package. Defaults and accepted values are included where the package declares them. Command-specific validation and permissions also apply; see the API reference for resource contracts.
Use socra analytics --help, or append --help to any command, to inspect the locally installed version.
socra analytics
Collect and query account-owned analytics
| Command | Purpose |
|---|---|
socra analytics schema | Discover event names and property types |
socra analytics events | Inspect events with filters and stable cursor pagination |
socra analytics query | Aggregate events with measures, breakdowns and comparisons |
socra analytics sample | Create or resume the reproducible sample dataset; prints expected results |
socra analytics authorization | Manage dataset principal roles |
socra analytics delivery | Inspect or revoke managed dataset delivery |
socra analytics dataset | Manage isolated analytics datasets |
socra analytics event | Ingest and inspect analytics events |
socra analytics report | Query analytics reports |
socra analytics schema
Discover event names and property types
socra analytics schema [options]
Options
| Option | Input | Description |
|---|---|---|
--dataset | Value | Dataset name or ID |
--event | Value | Exact event name |
--application | Value | Subscription project name or ID |
--where | Value | Structured JSON filter |
--since | Value | ISO date or duration: 24h, 30d, 12w (default 30d) |
--until | Value | End time, exclusive (default now) |
--json | Presence flag | Structured JSON output |
--csv | Presence flag | CSV output |
socra analytics events
Inspect events with filters and stable cursor pagination
socra analytics events [options]
Options
| Option | Input | Description |
|---|---|---|
--dataset | Value | Dataset name or ID |
--event | Value | Exact event name |
--application | Value | Subscription project name or ID |
--where | Value | Structured JSON filter |
--since | Value | ISO date or duration: 24h, 30d, 12w (default 30d) |
--until | Value | End time, exclusive (default now) |
--json | Presence flag | Structured JSON output |
--csv | Presence flag | CSV output |
--limit | Value | Maximum rows to return (default 20) |
--after | Value | Cursor from a previous page |
--direction | Value | asc or desc (default desc) |
socra analytics query
Aggregate events with measures, breakdowns and comparisons
socra analytics query [options]
Options
| Option | Input | Description |
|---|---|---|
--dataset | Value | Dataset name or ID |
--event | Value | Exact event name |
--application | Value | Subscription project name or ID |
--where | Value | Structured JSON filter |
--since | Value | ISO date or duration: 24h, 30d, 12w (default 30d) |
--until | Value | End time, exclusive (default now) |
--json | Presence flag | Structured JSON output |
--csv | Presence flag | CSV output |
--query-file | Value | Read a complete query JSON file |
--count | Presence flag | Count events |
--distinct | Value | Count distinct non-null field values |
--sum | Value | Sum numeric property |
--avg | Value | Average numeric property |
--min | Value | Minimum numeric property |
--max | Value | Maximum numeric property |
--percentile | Value | Percentile as 95:properties.latency_ms |
--group-by | Value | Comma-separated dimensions |
--every | Value | hour, day, week or month |
--timezone | Value | IANA timezone (default UTC) |
--order-by | Value | Comma-separated column:asc or column:desc |
--limit | Value | Maximum output rows (default 1000) |
--compare | Presence flag | Compare previous equal-duration period |
--no-fill | Presence flag | Do not fill missing time buckets |
--chart | Presence flag | Include terminal bar chart |
--explain | Presence flag | Print normalized query without executing |
socra analytics sample
Create or resume the reproducible sample dataset; prints expected results
socra analytics sample [options]
Options
| Option | Input | Description |
|---|---|---|
--name | Value | Sample dataset name (default analytics-sample) |
socra analytics authorization
Manage dataset principal roles
| Command | Purpose |
|---|---|
socra analytics authorization create | Grant a dataset role |
socra analytics authorization list | List dataset roles |
socra analytics authorization update | Change a dataset role |
socra analytics authorization delete | Revoke a dataset role |
socra analytics authorization create
Grant a dataset role
socra analytics authorization create <dataset> <principal> <role>
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
principal | Yes | Account-local principal UUID |
role | Yes | admin, viewer, or writer |
socra analytics authorization list
List dataset roles
socra analytics authorization list <dataset> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--limit | Value | Maximum rows to return (default 20) |
--after | Value | Cursor from a previous page |
socra analytics authorization update
Change a dataset role
socra analytics authorization update <dataset> <id> <role>
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
id | Yes | Authorization id |
role | Yes | admin, viewer, or writer |
socra analytics authorization delete
Revoke a dataset role
socra analytics authorization delete <dataset> <id>
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
id | Yes | Authorization id |
socra analytics delivery
Inspect or revoke managed dataset delivery
| Command | Purpose |
|---|---|
socra analytics delivery list | List managed delivery grants |
socra analytics delivery delete | Revoke managed delivery |
socra analytics delivery list
List managed delivery grants
socra analytics delivery list <dataset> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--limit | Value | Maximum rows to return (default 20) |
--after | Value | Cursor from a previous page |
socra analytics delivery delete
Revoke managed delivery
socra analytics delivery delete <dataset> <id>
Arguments
| Argument | Required | Description |
|---|---|---|
dataset | Yes | Dataset id |
id | Yes | Delivery id |
socra analytics dataset
Manage isolated analytics datasets
| Command | Purpose |
|---|---|
socra analytics dataset create | Create a dataset |
socra analytics dataset list | List datasets |
socra analytics dataset get | Get a dataset |
socra analytics dataset update | Update a dataset |
socra analytics dataset rotate-key | Replace a dataset ingestion write key |
socra analytics dataset delete | Delete a dataset |
socra analytics dataset create
Create a dataset
socra analytics dataset create <name> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | Dataset name |
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
--environment | Value | Environment name (default production) |
--retention-days | Value | Legacy compatibility value; events never expire |
socra analytics dataset list
List datasets
socra analytics dataset list [options]
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
--limit | Value | Maximum rows to return (default 20) |
--after | Value | Cursor from a previous page |
socra analytics dataset get
Get a dataset
socra analytics dataset get <id> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
socra analytics dataset update
Update a dataset
socra analytics dataset update <id> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
--name | Value | Dataset name |
--environment | Value | Environment name |
--retention-days | Value | Legacy compatibility value; events never expire |
--status | Value | active or suspended |
socra analytics dataset rotate-key
Replace a dataset ingestion write key
socra analytics dataset rotate-key <id> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
socra analytics dataset delete
Delete a dataset
socra analytics dataset delete <id> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | Dataset id |
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
socra analytics event
Ingest and inspect analytics events
| Command | Purpose |
|---|---|
socra analytics event track | Send one event using a dataset write key |
socra analytics event list | List events in a dataset |
socra analytics event track
Send one event using a dataset write key
socra analytics event track <name> [options]
Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | Stable event name |
Options
| Option | Input | Description |
|---|---|---|
--write-key | Value | Dataset write key |
--distinct-id | Value | User or actor identifier |
--session-id | Value | Session identifier |
--source | Value | Origin such as web, ios, or backend |
--properties | Value | JSON object of event properties |
--idempotency-key | Value | Stable retry identifier |
socra analytics event list
List events in a dataset
socra analytics event list [options]
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
--dataset | Value | Dataset id |
--name | Value | Event name |
--since | Value | Start time |
--until | Value | End time |
--limit | Value | Maximum rows to return (default 20) |
--after | Value | Cursor from a previous page |
socra analytics report
Query analytics reports
| Command | Purpose |
|---|---|
socra analytics report events | Count events over time |
socra analytics report events
Count events over time
socra analytics report events [options]
Options
| Option | Input | Description |
|---|---|---|
--project | Value | Optional legacy project alias |
--dataset | Value | Dataset id |
--since | Value | Start time (default 24 hours ago) |
--until | Value | End time (default now) |
--interval | Value | hour or day (default hour) |
--name | Value | Event name |
Next step
Return to the Analytics overview.