Cogny CLI · Analytics

    Simple Analytics queried from the terminal.

    List websites, pull aggregate stats, top pages, and top referrers, and read custom event stats over any date range — all from Bash over the Simple Analytics MCP. Privacy-first analytics without opening the dashboard.

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

    cogny --who

    TWO PATHS
    You're a human

    Simple Analytics keeps a clean, cookie-free dashboard, but answering "which pages and referrers moved last week" still means clicking around and eyeballing. The CLI returns those breakdowns as JSON you can diff week over week, schedule, or pass to an agent. Connect Simple Analytics 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 Simple Analytics 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 Simple Analytics MCP. Send --input JSON, get JSON back.

    mcp__Simple_Analytics__statsAggregate pageviews and visitors for a site over a range.
    $ cogny tools call mcp__Simple_Analytics__stats \
      --input '{"hostname":"example.com","start":"2026-06-01","end":"2026-06-14"}'
    example response
    {
      "pageviews": 41200,
      "visitors": 18044,
      "histogram": [
        {
          "date": "2026-06-01",
          "pageviews": 2810,
          "visitors": 1240
        }
      ]
    }
    mcp__Simple_Analytics__pagesTop pages by pageviews for a site.
    $ cogny tools call mcp__Simple_Analytics__pages \
      --input '{"hostname":"example.com","start":"2026-06-01","end":"2026-06-14","limit":3}'
    example response
    {
      "pages": [
        {
          "value": "/",
          "pageviews": 12044,
          "visitors": 7120
        },
        {
          "value": "/pricing",
          "pageviews": 5310,
          "visitors": 3880
        },
        {
          "value": "/blog/new-post",
          "pageviews": 2188,
          "visitors": 1944
        }
      ]
    }
    mcp__Simple_Analytics__referrersTop referrer sources for a site.
    $ cogny tools call mcp__Simple_Analytics__referrers \
      --input '{"hostname":"example.com","start":"2026-06-01","end":"2026-06-14","limit":3}'
    example response
    {
      "referrers": [
        {
          "value": "google.com",
          "pageviews": 8120,
          "visitors": 5440
        },
        {
          "value": "twitter.com",
          "pageviews": 1880,
          "visitors": 1210
        },
        {
          "value": "news.ycombinator.com",
          "pageviews": 940,
          "visitors": 760
        }
      ]
    }

    cogny tools list

    MORE

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

    mcp__Simple_Analytics__list_websitesmcp__Simple_Analytics__events

    cogny --faq

    Is this an official Simple Analytics CLI?

    No — it is the Cogny CLI calling the Simple Analytics MCP over the cogny-mcp-proxy. You connect your Simple Analytics credential once in Cogny and then call every tool from Bash with no API client to maintain.

    What date inputs do the tools accept?

    start / end accept ISO dates (YYYY-MM-DD) or relative values the API supports, like "today" and "yesterday". pages, referrers, and events take a limit to cap rows.

    Does it expose custom events?

    Yes — events returns custom event stats for a site over the date range, alongside the page and referrer breakdowns. Everything is aggregate and cookie-free by design.

    related CLIs

    /cli/plausible/cli/fathom/cli/ga4

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