Sign up

CLI

CLI command reference

On this page

Run metricraven <command> --help for the options of any command. Dated reports accept the period and filter flags.

Account and websites

CommandDoes
login / logoutSave the access token after checking it, or remove it.
whoamiThe account, the token's access and the websites it can use.
websites listWebsites the token can use; * marks the default.
websites create --name --domainAdd a website (write access, token for all websites). Prints its ID, secret key (once) and tracking script.
use <website_id>Save the default website.

Analytics (read access)

CommandShows
analytics trafficTotals with change vs the previous period, and the top channels, pages and countries.
analytics breakdown <dimension>A full table for channel, referrer, page, entryPage, utmSource, utmCampaign, country, city, browser, device, outbound and more. Options --sort visitors|pageviews|revenue, --limit, --offset, --q.
analytics revenuePayments, renewals, refunds, lifetime value and revenue by channel.
analytics conversionsGoals and funnel steps.
analytics goal <name>One goal with its sources and properties.
analytics insightsWhat turns visitors into buyers and how long they take.
analytics searchGoogle Search Console queries (when connected).
analytics crawlersAI crawlers and bots.
realtimeVisitors online now.
funnels listSaved funnels and steps.
notes listChart notes in the period.

Visitors (visitor details access)

CommandShows
visitors listVisitors in the period. Options --q, --payment all|paid|unpaid, --sort latest|earliest|pageviews, --limit, --offset.
visitors get <visitor_id>One visitor's summary and journey.

Changes (write access)

CommandDoes
notes add --text [--date YYYY-MM-DD]Adds a chart note, dated today by default.

Shell completion

terminal
# zsh: add to ~/.zshrc
eval "$(metricraven completion zsh)"
# bash: add to ~/.bashrc
eval "$(metricraven completion bash)"
# fish
metricraven completion fish > ~/.config/fish/completions/metricraven.fish

Details

  • Exit code 1 on any error, with a message that names missing access, e.g. when a token lacks visitor details.
  • --json prints the API response unchanged, the same shapes as the Reports API.