Cogny CLI · Analytics

    Fathom Analytics from your shell.

    List sites and conversion events, pull aggregate stats with time grouping and filters, and read current visitor counts — all from Bash over the Fathom Analytics MCP. Privacy-friendly analytics, scriptable without the dashboard.

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

    cogny --who

    TWO PATHS
    You're a human

    Fathom’s single-page dashboard is great for a quick look, but pulling a specific date-grouped breakdown or an event’s conversions means re-filtering and exporting by hand. The CLI returns those aggregates as JSON you can schedule or feed to an agent. Connect Fathom 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 Fathom 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 Fathom Analytics MCP. Send --input JSON, get JSON back.

    mcp__Fathom_Analytics__aggregateAggregate pageviews, visits, uniques, and bounce rate by day.
    $ cogny tools call mcp__Fathom_Analytics__aggregate \
      --input '{"entity":"pageview","entity_id":"CDBUGS","aggregates":"pageviews,visits,uniques,bounce_rate","date_from":"2026-06-01 00:00:00","date_to":"2026-06-14 23:59:59","date_grouping":"day"}'
    example response
    [
      {
        "date": "2026-06-01",
        "pageviews": 1840,
        "visits": 1212,
        "uniques": 1104,
        "bounce_rate": 0.46
      },
      {
        "date": "2026-06-02",
        "pageviews": 2010,
        "visits": 1388,
        "uniques": 1251,
        "bounce_rate": 0.43
      }
    ]
    mcp__Fathom_Analytics__current_visitorsLive visitor count, optionally broken down by page.
    $ cogny tools call mcp__Fathom_Analytics__current_visitors \
      --input '{"site_id":"CDBUGS","detailed":true}'
    example response
    {
      "total": 18,
      "content": [
        {
          "pathname": "/pricing",
          "total": 7
        },
        {
          "pathname": "/",
          "total": 5
        }
      ]
    }
    mcp__Fathom_Analytics__list_eventsList configured conversion events for a site.
    $ cogny tools call mcp__Fathom_Analytics__list_events \
      --input '{"site_id":"CDBUGS"}'
    example response
    {
      "object": "list",
      "data": [
        {
          "id": "signup-completed",
          "name": "Signup completed"
        },
        {
          "id": "demo-booked",
          "name": "Demo booked"
        }
      ]
    }

    cogny tools list

    MORE

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

    mcp__Fathom_Analytics__list_sitesmcp__Fathom_Analytics__list_email_reports

    cogny --faq

    Is this an official Fathom CLI?

    No — it is the Cogny CLI calling the Fathom Analytics MCP over the cogny-mcp-proxy. You connect your Fathom API token once in Cogny and then call every tool from Bash with no API plumbing of your own.

    Can I get event conversions, not just pageviews?

    Yes. Set entity to "event" and entity_id to the event ID in aggregate to pull that conversion’s stats; use list_events first to discover the IDs configured on the site.

    What date format do the stats tools expect?

    date_from / date_to use "YYYY-MM-DD HH:MM:SS" in UTC, and field_grouping can be hour, day, month, or year. The data is privacy-first — no per-visitor PII, just aggregates.

    related CLIs

    /cli/plausible/cli/simple-analytics/cli/ga4

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