Skip to main content

Plausible from the command line

Your website analytics, read with a Stats API key of your own. GBrain gives Plausible, and every other connector you add, a command line.

Get Personal, $49 a month

One price for one person: Plausible and every other connector GBrain offers, from a terminal or any AI. Cancel any time.

Install the GBrain command line, then connect Plausible

Plausible takes a key, pasted in the browser and kept encrypted on GBrain's servers. A key or a sign-in never passes through the terminal.

# AI agents: read gbrain.io/llms.txt
curl -sSL https://gbrainio.terminalwire.sh | bash
gbrainio terminal connect

The installer is a shell script for macOS and Linux. Read it before you run it.

# Every Plausible command, once Plausible is connected
gbrainio tool help plausible

What GBrain can do with Plausible

Plausible counts your website’s visitors without cookies. Connect it with a Stats API key you make in Plausible, under the team that owns your site, and your AI can answer how many people visited a page, where they came from, and how that compares with last week. GBrain keeps the key encrypted and only reads with it: it cannot add a site, change a goal or invite anyone.

  • Count visitors, visits and pageviews for any page and any dates
  • Say where visitors came from, by source, referrer, campaign or channel
  • Compare a period with the one before it
  • Read your sites, goals and custom properties
  • See who is on your site right now
gbrainio
gbrainio tool plausibleYour website analytics, read with a Stats API key of your own.USAGE  gbrainio tool plausible <command> [arguments]COMMANDS  query          Read your site analytics  realtime       See who is on your site now  sites          See your Plausible sites  site-settings  Read a Plausible site's settings  teams          See your Plausible teams  goals          See a site's goals  properties     See a site's custom properties  guests         See who a site is shared with  open           Open its page in the browserLEARN MORE  gbrainio tool plausible <command> -h  What one command takes  https://gbrain.io/docs/tools          The manualgbrainio tool plausible query -hRead your site analyticsReads website analytics from Plausible (READ ONLY). It counts visitors, visits,pageviews, bounce rate, visit duration, time on page, scroll depth, conversionsand revenue, for any date range, split by any dimension and narrowed by anyfilter. Use it for 'how many people visited page X last week, and where did theycome from': page "/x", date_range "7d", dimensions ["visit:source"]. Withnothing but a site it answers visitors, visits and pageviews for the last 7days. Dimensions: event:page, event:goal, event:hostname, visit:source,visit:referrer, visit:channel, visit:utm_source, visit:utm_medium,visit:utm_campaign, visit:utm_content, visit:utm_term, visit:entry_page,visit:exit_page, visit:country_name, visit:region_name, visit:city_name,visit:device, visit:browser, visit:os (and their versions), time, time:hour,time:day, time:week, time:month, and event:props:<name> for a custom property.Each row carries its dimension and metric names. compare adds the period before(or the year before), with each row's change in percent. A cut answer saystruncated and gives next_offset. Read only: nothing here can change a site, agoal or a setting in Plausible.USAGE  gbrainio tool plausible query [flags]FLAGS  --compare <value>      Also read the period just before (previous_period) or                         the same dates a year earlier  --date-range <value>   A period: day, 24h, 7d, 28d, 30d, 91d, month, 6mo,                         12mo, year, all, or Nd; or two dates ["2026-11-01",                         "2026-11-07"] (or two ISO times). 7d when left out  --dimensions <value>   What to split the numbers by, like ["visit:source"] or                         ["time:day"]; none gives one total row  --filters <value>      Plausible filters as written in its Stats API: ["is",                         "visit:country_name", ["Germany"]], with is, is_not,                         contains, contains_not, matches, matches_not, and, or,                         not, has_done, has_not_done, and ["is", "segment",                         [id]]. page adds one for you  --include <json>       Extras: imports (add imported data), time_labels (every                         time bucket), total_rows, trim_relative_date_range,                         each true or false  --limit <value>        Rows to return, 1 to 1000 (100 when left out)  --metrics <value>      Any of visitors, visits, pageviews, views_per_visit,                         bounce_rate, visit_duration, events, scroll_depth,                         time_on_page, percentage, conversion_rate,                         group_conversion_rate, average_revenue, total_revenue.                         visitors, visits and pageviews when left out  --offset <value>       Rows to skip, for the next page: the next_offset an                         earlier answer gave  --order-by <value>     How to sort rows, like [["visitors", "desc"]]; each                         name must be a metric or dimension asked for  --page <value>         Only this page, as its path: /pricing. End it with *                         for every page under it: /blog*  --site <value>         The site's domain as Plausible lists it, like                         gbrain.io. Left out: the one site this key reaches  -w, --workspace <id>   The workspace, when this terminal reaches several  -u, --user <email>     Whose copy, when several people share a tool there  -a, --account <email>  Choose one of several connected accounts  -f, --format <kind>    json or text; text on a terminal, json piped  -d, --dry-run          Show what would run, without running itLEARN MORE  gbrainio tool plausible -h    Every plausible command  https://gbrain.io/docs/tools  The manualOver MCP this tool is plausible_query.
Every Plausible command, one line each.

The page and the CLI print these from the same code, so they are what the CLI answers today.

What a terminal may do with Plausible, and what GBrain keeps

A level for each terminal, from Off up

Each terminal reaches Plausible at the level set for it in the browser: Off or Read. A terminal reads its level and never raises it.

A daily limit on each command

Each of Plausible's commands stops at a daily limit on the account it reaches, from 200 to 2,000 actions depending on the command, whichever terminal or AI asks, and starts again at midnight UTC. Only that command stops.

Every action on one record

Each command a terminal runs on Plausible is a row on GBrain's activity log: which terminal, which account, what it did and whether it was allowed, refusals included. gbrainio activity ls --tool plausible reads it back.

From a terminal, Claude Code or Codex

gbrainio tool help plausible says what Plausible is and what each of its commands does, and gbrainio tool ls lists them with everything else the terminal can run. Claude Code and Codex run the same commands, at the same level, on the same record.

The GBrain Tools command line works with every other connector GBrain offers, each with a page like this one.

Every connector's command line

Plausible from a terminal, with GBrain Personal

Personal is $49 a month for one person. Connect Plausible in the browser, and say how far each terminal and each AI may go with it. Change any of it, or take all of it back, whenever you want.