CLI
Query your Actually Tracking analytics from the terminal.
The CLI runs the same queries as the MCP server: traffic, pages, sources, events, funnels and revenue, printed as tables or JSON. It needs Node 18 or later.
npx @actually-tracking/cli login
npx @actually-tracking/cli overviewInstall it to drop the npx:
npm install -g @actually-tracking/cli
actually-tracking pages --days 7Signing in
actually-tracking login opens your browser on the same consent screen AI apps use: pick one project, or every project of an organization if you're its admin. The CLI gets read-only access, kept in ~/.config/actually-tracking/config.json (readable only by you) and refreshed on its own. actually-tracking logout signs out and revokes it; you can also disconnect it in Project settings → MCP.
For CI and scripts, use a client token instead (base64(clientId:clientSecret), from Project settings → Clients / API keys):
ACTUALLY_TRACKING_TOKEN=... actually-tracking revenue --jsonCommands
| Command | What it shows |
|---|---|
projects | The projects you can query |
use <project-id> | Sets the default project |
overview | Visitors, pageviews, sessions, bounce rate and duration (--series adds the per-day series) |
pages | Top pages |
sources | Top referrers (--by for another breakdown) |
countries, devices | Visitors by country or device |
events [names…] | Recent events, optionally only these names |
event-names | Every event name in the project |
revenue | Revenue, MRR, subscription activity and revenue by source (--by utm_campaign, …) |
funnel <a> <b> […] | Conversion through these events, in order |
bots | AI crawlers and other bots: visits, verification, top pages |
live | Who is on the site now: locations, pages, latest events and payments (--limit visitors) |
tools | Every tool the API offers |
call <tool> [key=value…] | Any tool, e.g. call get_top_pages limit=5 |
Managing funnels, goals, alerts, the team and keys
These commands change things, so they need an API key with the matching permission rather than a browser sign-in: actually-tracking login --token <key>, or ACTUALLY_TRACKING_TOKEN. The key is base64 of clientId:clientSecret.
| Command | |
|---|---|
funnels | Saved funnels |
funnels create <name> <step…> | Steps are events, or pages starting with /. --window <hours>, --by visitor, --range 30d |
funnels run <id> | Conversion at each step, over --days, --from and --to or the funnel's own range |
funnels delete <id> | |
goals | Events with completions and conversion rate |
goals mark <event> / goals unmark <event> | Count an event as a conversion, or stop |
alerts / alerts history | Alerts, and the ones that went out |
alerts create <name> <step…> | Fires on any of the steps; --funnel for all of them in order; --email also emails the project's members |
alerts delete <id> | |
team | Members and open invites |
team invite <email> | --role viewer or member (default) |
team remove <user-id> | Members and viewers only; owners and admins are managed in the dashboard |
keys | API keys |
keys create <name> --permissions <a,b> | --org for every project in the organization |
keys revoke <id> |
actually-tracking funnels create "Pricing to signup" /pricing signup --window 48
actually-tracking goals mark signup
actually-tracking alerts create "New signup" signup --emailOptions
| Option | |
|---|---|
--project <id> | Project to query; else the default from use or ACTUALLY_TRACKING_PROJECT |
--days <n>, --from, --to | Date range (default: the last 30 days) |
--limit <n> | Rows to return |
--json | Raw JSON, for jq and scripts |
--api-url <url> | Another Actually Tracking API |
MCP Server
Connect AI assistants to your Actually Tracking analytics data using the Model Context Protocol.
Understand the overview
The overview is the main page of every Actually Tracking project. It gives you a real-time picture of how your site or app is performing right now and over any time range you choose. This page explains every section and every number so you know exactly what you're looking at.