# CLI

> The atrby CLI wraps the REST API for sites, stats, revenue, vitals and funnels, and is not yet published to npm; curl calls work in the meantime.

Canonical: https://atrby.site/docs/cli
Last updated: 2026-10-21

Your numbers in the terminal, for scripts and cron jobs.

**Not on npm yet.** The `atrby` CLI is a thin client of the [REST API](https://atrby.site/docs/api) and isn't published yet. Until it is, the same calls work with `curl`, as below.

## Commands

| Command | What it does |
| --- | --- |
| atrby sites | List the sites in your workspace. |
| atrby stats --site S | Visitors, pageviews, revenue and conversion. |
| atrby revenue --site S | Revenue by source. |
| atrby vitals --site S | Core Web Vitals at p75. |
| atrby funnel --site S | The default funnel: any page, /pricing, paid. |

Every command takes `--range` (today, 24h, 7d, 30d, 90d) and `--json` for machine-readable output. It reads your key from `ATRBY_API_KEY`.

## The same with curl

```bash
export ATRBY_API_KEY=atr_live_YOUR_KEY

# Revenue by source, last 30 days
curl -s "https://app.atrby.site/api/v1/revenue?site=acme.io&range=30d" \
  -H "Authorization: Bearer $ATRBY_API_KEY" | jq '.sources'
```

## Related
- [REST API](https://atrby.site/docs/api)
- [MCP](https://atrby.site/docs/mcp)
