Cogny CLI · Analytics

    Plausible queried from the terminal.

    Run Plausible Stats API v2 queries, pull aggregate metrics, time series, and breakdowns by page, source, country, or device, and count live visitors — all from Bash over the Plausible MCP. The Stats API without the curl boilerplate.

    # 1. sign up (free for 15 calls) — uses your git email
    $ npx @cogny/cli init --agent claude-code
    
    # 2. see every Plausible tool
    $ cogny tools list
    
    # 3. call any tool from Bash — no MCP wiring
    $ cogny tools call mcp__Plausible__breakdown --input '{…}'
    ❯ start Cogny Solo — $9/mo@cogny/cli on npm →

    cogny --who

    TWO PATHS
    You're a human

    The Plausible dashboard is fast for a glance but slow for ad-hoc questions — you click filter pills and screenshot the chart. The CLI gives you the exact metric × dimension breakdown as JSON you can pipe, schedule, or hand to an agent. Connect Plausible once in Cogny Solo and let your coding agent — or scheduled reports — do the querying for you.

    ❯ start Solo
    You're an agent

    Self-onboard with one command. The CLI issues a key, wires nothing, and exposes every Plausible tool over JSON-RPC. First 15 calls are free.

    $ npx @cogny/cli init --agent claude-code

    cogny tools call

    3 EXAMPLES

    Real tool names from the Plausible MCP. Send --input JSON, get JSON back.

    mcp__Plausible__breakdownBreak a metric down by a property (top pages, sources, etc.).
    $ cogny tools call mcp__Plausible__breakdown \
      --input '{"site_id":"example.com","dimension":"visit:source","metrics":["visitors","bounce_rate"],"date_range":"7d","limit":3}'
    example response
    {
      "results": [
        {
          "dimensions": [
            "Google"
          ],
          "metrics": [
            4120,
            0.41
          ]
        },
        {
          "dimensions": [
            "Direct"
          ],
          "metrics": [
            1880,
            0.52
          ]
        },
        {
          "dimensions": [
            "Twitter"
          ],
          "metrics": [
            640,
            0.63
          ]
        }
      ]
    }
    mcp__Plausible__aggregateHeadline metrics for a site over a period.
    $ cogny tools call mcp__Plausible__aggregate \
      --input '{"site_id":"example.com","metrics":["visitors","pageviews","bounce_rate"],"date_range":"30d"}'
    example response
    {
      "results": [
        {
          "metrics": [
            38214,
            91022,
            0.47
          ]
        }
      ]
    }
    mcp__Plausible__realtime_visitorsCount of visitors active in the last 5 minutes.
    $ cogny tools call mcp__Plausible__realtime_visitors \
      --input '{"site_id":"example.com"}'
    example response
    23

    cogny tools list

    MORE

    A sample of the rest of the Plausible surface. Run cogny tools list --json for every tool and its input schema.

    mcp__Plausible__querymcp__Plausible__timeseries

    cogny --faq

    Is this an official Plausible CLI?

    No — it is the Cogny CLI calling the Plausible MCP over the cogny-mcp-proxy. You connect your Plausible API key once in Cogny and then call every tool from Bash. Self-hosted and EU instances are supported via the connection’s server URL.

    Which metrics and dimensions can I use?

    The full Stats API v2 set: metrics like visitors, visits, pageviews, bounce_rate, visit_duration, and conversion_rate; dimensions like event:page, visit:source, visit:country, visit:device, and time:day. Pass them straight through query.

    Can I schedule these from cron?

    Yes. The CLI is a normal binary — wire cogny tools call breakdown --input ... into cron, a Makefile, or your agent and capture stdout. On Cogny Solo, standard MCP calls are unmetered under fair use.

    related CLIs

    /cli/fathom/cli/simple-analytics/cli/ga4

    Building an agent? The full tool map for all servers is one fetch: /cli/llms.txt