Skip to main content
The data commands provide powerful tools to explore and analyze your Autumn data. Each command offers both interactive browsing and headless export capabilities.

Customers

Browse and inspect your customer data, subscriptions, and usage.

Basic Usage

atmn customers
Opens an interactive table interface for browsing customers with search, filtering, and pagination.

Command Options

--headless
flag
Run in headless mode for scripting and automation
--page <n>
number
default:"1"
Page number for pagination (headless mode)
--search <query>
string
Search customers by name, email, or ID (headless mode)
--id <id>
string
Get a specific customer by ID (headless mode)
--limit <n>
number
default:"50"
Number of customers per page (headless mode)
--format <format>
enum
default:"text"
Output format: text, json, csv (headless mode)

Interactive Mode

The interactive interface provides:
  • Rich Table Display: Sortable columns with customer info, plans, and usage
  • Live Search: Filter customers in real-time
  • Detailed View: Press Enter to see full customer details
  • Pagination: Navigate through large customer lists
  • Plan Information: See active subscriptions and add-ons

Headless Mode Examples

atmn customers --headless --format json

Plans/Products

Browse and inspect your pricing plans and product configurations.

Basic Usage

atmn plans
# or
atmn products
Both commands are aliases and provide identical functionality.

Command Options

--headless
flag
Run in headless mode for scripting and automation
--page <n>
number
default:"1"
Page number for pagination (headless mode)
--search <query>
string
Search plans by name or ID (headless mode)
--id <id>
string
Get a specific plan by ID (headless mode)
--limit <n>
number
default:"50"
Number of plans per page (headless mode)
--format <format>
enum
default:"text"
Output format: text, json, csv (headless mode)
--include-archived
flag
Include archived plans in the results

Interactive Features

  • Plan Overview: See pricing, features, and customer counts
  • Feature Breakdown: View included features and pricing rules
  • Customer Analytics: See how many customers are on each plan
  • Version History: Browse different versions of plans
  • Archive Status: Filter between active and archived plans

Headless Examples

atmn plans --headless --format json

Features

Browse and inspect your feature definitions and configurations.

Basic Usage

atmn features

Command Options

--headless
flag
Run in headless mode for scripting and automation
--page <n>
number
default:"1"
Page number for pagination (headless mode)
--search <query>
string
Search features by name or ID (headless mode)
--id <id>
string
Get a specific feature by ID (headless mode)
--limit <n>
number
default:"50"
Number of features per page (headless mode)
--format <format>
enum
default:"text"
Output format: text, json, csv (headless mode)
--include-archived
flag
Include archived features in the results

Interactive Features

  • Feature Types: See boolean, metered, and credit system features
  • Usage Analytics: View usage patterns and limits
  • Plan Usage: See which plans include each feature
  • Credit Mappings: For credit system features, see cost mappings
  • Dependencies: Understand feature relationships

Headless Examples

atmn features --headless --format json | jq '.[] | {id, name, type}'

Events

Browse and analyze usage events from your application.

Basic Usage

atmn events

Command Options

--headless
flag
Run in headless mode for scripting and automation
--page <n>
number
default:"1"
Page number for pagination
--customer <id>
string
Filter events by customer ID
--feature <id>
string
Filter by feature ID (comma-separated for multiple)
--limit <n>
number
default:"100"
Number of events per page
--time <range>
enum
default:"7d"
Time range: 24h, 7d, 30d, 90d
--mode <mode>
enum
default:"list"
View mode: list (individual events) or aggregate (summary stats)
--bin <size>
enum
Bin size for aggregate mode: hour, day, month
--group-by <property>
string
Group by property in aggregate mode (e.g., customer_id, feature_id)
--format <format>
enum
default:"text"
Output format: text, json, csv

Interactive Mode Features

List Mode:
  • Event Stream: Real-time view of usage events
  • Rich Details: Customer, feature, amount, timestamp
  • Filtering: Live filters for customer, feature, and time range
  • Search: Find specific events or patterns
Aggregate Mode:
  • Usage Charts: Visual charts of usage patterns
  • Time Series: Usage trends over time
  • Grouping: Break down usage by customer, feature, or other dimensions
  • Statistics: Min, max, average, total usage

Headless Examples

atmn events --headless --customer "cus_123" --time "24h" --format json

Aggregate Mode Examples

Aggregate mode is powerful for analytics:
# Daily usage totals for last week
atmn events --headless --mode aggregate --bin day --time 7d --format json

# Usage by feature over last month  
atmn events --headless --mode aggregate --group-by feature_id --time 30d --format csv

# Hourly usage patterns for specific customer
atmn events --headless --mode aggregate --bin hour --customer "cus_123" --time 7d

Data Export Workflows

Customer Analysis

atmn customers --headless --format csv > customers.csv

# Get detailed customer data
atmn customers --headless --format json > customers.json

Usage Analytics

atmn events --headless --mode aggregate --group-by feature_id --time 30d --format csv > usage_report.csv

Plan Performance

atmn customers --headless --format json | \
  jq 'group_by(.plan_id) | map({plan: .[0].plan_id, customers: length})'

Automation & Scripting

Monitoring Scripts

Create monitoring dashboards with regular data exports:
#!/bin/bash
# Daily usage monitoring script

DATE=$(date +%Y-%m-%d)

# Export daily metrics
atmn events --headless --mode aggregate --bin day --time 1d --format json > "usage_${DATE}.json"
atmn customers --headless --format csv > "customers_${DATE}.csv"

# Alert on high usage
TOTAL_USAGE=$(jq '.[] | .total_usage' "usage_${DATE}.json" | awk '{sum+=$1} END {print sum}')
if (( $(echo "$TOTAL_USAGE > 10000" | bc -l) )); then
  echo "Alert: High usage detected: $TOTAL_USAGE"
fi

Data Pipeline Integration

Integrate with analytics platforms:
# Export to BigQuery-compatible CSV
atmn events --headless --time 7d --format csv --limit 100000 | \
  bq load --source_format=CSV dataset.events /dev/stdin

# Send to webhook for real-time processing
atmn events --headless --time 1h --format json | \
  curl -X POST -H "Content-Type: application/json" -d @- https://webhook.example.com/events

Environment-Specific Data

Remember that data is environment-specific:
atmn customers --headless --format json
Production Data: Be cautious when exporting production data. Ensure you comply with privacy policies and data protection regulations when handling customer information.

Performance Tips

For large datasets:
  • Use --limit to control memory usage
  • Export in batches using --page parameter
  • Use --format csv for better performance with large datasets
  • Filter early with --customer, --feature, or --time flags
  • Use aggregate mode for summary statistics instead of raw events