KosmoKrator

analytics

Fathom Analytics CLI for AI Agents

Use the Fathom Analytics CLI from KosmoKrator to call Fathom Analytics tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Fathom Analytics CLI Setup

Fathom Analytics can be configured headlessly with `kosmokrator integrations:configure fathom`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure fathom --enable --read allow --write ask --json
kosmokrator integrations:doctor fathom --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call fathom.fathom_get_account '{}' --json
Provider shortcut
kosmo integrations:fathom fathom_get_account '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs fathom --json
kosmo integrations:docs fathom.fathom_get_account --json
kosmo integrations:schema fathom.fathom_get_account --json
kosmo integrations:search "Fathom Analytics" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

fathom.fathom_get_account

Get the authenticated Fathom account profile from the documented /account endpoint.

Read read
Parameters
none
Generic call
kosmo integrations:call fathom.fathom_get_account '{}' --json
Shortcut
kosmo integrations:fathom fathom_get_account '{}' --json

fathom.fathom_get_current_user

Get the authenticated Fathom account profile. This calls the documented /account endpoint.

Read read
Parameters
none
Generic call
kosmo integrations:call fathom.fathom_get_current_user '{}' --json
Shortcut
kosmo integrations:fathom fathom_get_current_user '{}' --json

fathom.fathom_list_sites

List all websites tracked in Fathom Analytics. Returns site IDs, names, and domains you can query for analytics data.

Read read
Parameters
limit, starting_after, ending_before
Generic call
kosmo integrations:call fathom.fathom_list_sites '{"limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json
Shortcut
kosmo integrations:fathom fathom_list_sites '{"limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json

fathom.fathom_get_site

Get details for a specific Fathom Analytics site by ID. Returns site name, domain, tracking code, and other configuration.

Read read
Parameters
site_id
Generic call
kosmo integrations:call fathom.fathom_get_site '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:fathom fathom_get_site '{"site_id":"example_site_id"}' --json

fathom.fathom_create_site

Create a new Fathom site with a name and optional sharing settings.

Write write
Parameters
name, sharing, share_password
Generic call
kosmo integrations:call fathom.fathom_create_site '{"name":"example_name","sharing":"example_sharing","share_password":"example_share_password"}' --json
Shortcut
kosmo integrations:fathom fathom_create_site '{"name":"example_name","sharing":"example_sharing","share_password":"example_share_password"}' --json

fathom.fathom_update_site

Update a Fathom site name or sharing settings.

Write write
Parameters
site_id, name, sharing, share_password
Generic call
kosmo integrations:call fathom.fathom_update_site '{"site_id":"example_site_id","name":"example_name","sharing":"example_sharing","share_password":"example_share_password"}' --json
Shortcut
kosmo integrations:fathom fathom_update_site '{"site_id":"example_site_id","name":"example_name","sharing":"example_sharing","share_password":"example_share_password"}' --json

fathom.fathom_wipe_site

Wipe all pageviews and event completions from a Fathom site. This is destructive.

Write write
Parameters
site_id
Generic call
kosmo integrations:call fathom.fathom_wipe_site '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:fathom fathom_wipe_site '{"site_id":"example_site_id"}' --json

fathom.fathom_delete_site

Delete a Fathom site. This is destructive and cannot be undone.

Write write
Parameters
site_id
Generic call
kosmo integrations:call fathom.fathom_delete_site '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:fathom fathom_delete_site '{"site_id":"example_site_id"}' --json

fathom.fathom_list_events

List custom events tracked in Fathom Analytics for a site. Returns event names, event IDs, and configuration details.

Read read
Parameters
site_id, limit, starting_after, ending_before
Generic call
kosmo integrations:call fathom.fathom_list_events '{"site_id":"example_site_id","limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json
Shortcut
kosmo integrations:fathom fathom_list_events '{"site_id":"example_site_id","limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json

fathom.fathom_get_event

Get one Fathom event by site ID and event ID.

Read read
Parameters
site_id, event_id
Generic call
kosmo integrations:call fathom.fathom_get_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json
Shortcut
kosmo integrations:fathom fathom_get_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json

fathom.fathom_create_event

Create a Fathom event for a site.

Write write
Parameters
site_id, name
Generic call
kosmo integrations:call fathom.fathom_create_event '{"site_id":"example_site_id","name":"example_name"}' --json
Shortcut
kosmo integrations:fathom fathom_create_event '{"site_id":"example_site_id","name":"example_name"}' --json

fathom.fathom_update_event

Update a Fathom event name.

Write write
Parameters
site_id, event_id, name
Generic call
kosmo integrations:call fathom.fathom_update_event '{"site_id":"example_site_id","event_id":"example_event_id","name":"example_name"}' --json
Shortcut
kosmo integrations:fathom fathom_update_event '{"site_id":"example_site_id","event_id":"example_event_id","name":"example_name"}' --json

fathom.fathom_wipe_event

Wipe all completion data belonging to a Fathom event. This is destructive.

Write write
Parameters
site_id, event_id
Generic call
kosmo integrations:call fathom.fathom_wipe_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json
Shortcut
kosmo integrations:fathom fathom_wipe_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json

fathom.fathom_delete_event

Delete a Fathom event. This is destructive and cannot be undone.

Write write
Parameters
site_id, event_id
Generic call
kosmo integrations:call fathom.fathom_delete_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json
Shortcut
kosmo integrations:fathom fathom_delete_event '{"site_id":"example_site_id","event_id":"example_event_id"}' --json

fathom.fathom_list_milestones

List milestones for a Fathom site with cursor pagination.

Read read
Parameters
site_id, limit, starting_after, ending_before
Generic call
kosmo integrations:call fathom.fathom_list_milestones '{"site_id":"example_site_id","limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json
Shortcut
kosmo integrations:fathom fathom_list_milestones '{"site_id":"example_site_id","limit":1,"starting_after":"example_starting_after","ending_before":"example_ending_before"}' --json

fathom.fathom_get_milestone

Get one milestone by site ID and milestone ID.

Read read
Parameters
site_id, milestone_id
Generic call
kosmo integrations:call fathom.fathom_get_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id"}' --json
Shortcut
kosmo integrations:fathom fathom_get_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id"}' --json

fathom.fathom_create_milestone

Create a milestone for a Fathom site.

Write write
Parameters
site_id, name, milestone_date
Generic call
kosmo integrations:call fathom.fathom_create_milestone '{"site_id":"example_site_id","name":"example_name","milestone_date":"example_milestone_date"}' --json
Shortcut
kosmo integrations:fathom fathom_create_milestone '{"site_id":"example_site_id","name":"example_name","milestone_date":"example_milestone_date"}' --json

fathom.fathom_update_milestone

Update a Fathom milestone name or date.

Write write
Parameters
site_id, milestone_id, name, milestone_date
Generic call
kosmo integrations:call fathom.fathom_update_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id","name":"example_name","milestone_date":"example_milestone_date"}' --json
Shortcut
kosmo integrations:fathom fathom_update_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id","name":"example_name","milestone_date":"example_milestone_date"}' --json

fathom.fathom_delete_milestone

Delete a Fathom milestone. This is destructive and cannot be undone.

Write write
Parameters
site_id, milestone_id
Generic call
kosmo integrations:call fathom.fathom_delete_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id"}' --json
Shortcut
kosmo integrations:fathom fathom_delete_milestone '{"site_id":"example_site_id","milestone_id":"example_milestone_id"}' --json

fathom.fathom_get_aggregate

Get aggregated analytics data from Fathom. Supports pageviews, visits, uniques, bounce rate, and more. Can group results by page, country, browser, device type, etc.

Read read
Parameters
site_id, date_from, date_to, metrics, group_by, sort_by, limit, date_grouping, timezone, filters
Generic call
kosmo integrations:call fathom.fathom_get_aggregate '{"site_id":"example_site_id","date_from":"example_date_from","date_to":"example_date_to","metrics":"example_metrics","group_by":"example_group_by","sort_by":"example_sort_by","limit":1,"date_grouping":"example_date_grouping"}' --json
Shortcut
kosmo integrations:fathom fathom_get_aggregate '{"site_id":"example_site_id","date_from":"example_date_from","date_to":"example_date_to","metrics":"example_metrics","group_by":"example_group_by","sort_by":"example_sort_by","limit":1,"date_grouping":"example_date_grouping"}' --json

fathom.fathom_get_current_visitors

Get the current visitor count for a Fathom site, optionally with top pages and referrers.

Read read
Parameters
site_id, detailed
Generic call
kosmo integrations:call fathom.fathom_get_current_visitors '{"site_id":"example_site_id","detailed":true}' --json
Shortcut
kosmo integrations:fathom fathom_get_current_visitors '{"site_id":"example_site_id","detailed":true}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

fathom.fathom_get_account 0 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_account --json
ParameterTypeRequiredDescription
No parameters.
fathom.fathom_get_current_user 0 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
fathom.fathom_list_sites 3 parameters
Schema command
kosmo integrations:schema fathom.fathom_list_sites --json
ParameterTypeRequiredDescription
limit integer no Maximum number of sites to return (default: 20).
starting_after string no Cursor for pagination; pass the ID of the last site from a previous response.
ending_before string no Cursor for pagination; pass the ID of the first site from a previous response.
fathom.fathom_get_site 1 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_site --json
ParameterTypeRequiredDescription
site_id string yes The Fathom site ID (e.g., "CDCLS").
fathom.fathom_create_site 3 parameters
Schema command
kosmo integrations:schema fathom.fathom_create_site --json
ParameterTypeRequiredDescription
name string yes Website name.
sharing string no Sharing setting: none, private, or public.
share_password string no Password required when sharing is private.
fathom.fathom_update_site 4 parameters
Schema command
kosmo integrations:schema fathom.fathom_update_site --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
name string no Updated website name.
sharing string no Sharing setting: none, private, or public.
share_password string no Password required when sharing is private.
fathom.fathom_wipe_site 1 parameters
Schema command
kosmo integrations:schema fathom.fathom_wipe_site --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
fathom.fathom_delete_site 1 parameters
Schema command
kosmo integrations:schema fathom.fathom_delete_site --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
fathom.fathom_list_events 4 parameters
Schema command
kosmo integrations:schema fathom.fathom_list_events --json
ParameterTypeRequiredDescription
site_id string yes The Fathom site ID (e.g., "CDCLS").
limit integer no Maximum number of events to return (default: 20).
starting_after string no Cursor for pagination; event ID to start after.
ending_before string no Cursor for pagination; event ID to end before.
fathom.fathom_get_event 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_event --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
event_id string yes Fathom event ID.
fathom.fathom_create_event 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_create_event --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
name string yes Event name.
fathom.fathom_update_event 3 parameters
Schema command
kosmo integrations:schema fathom.fathom_update_event --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
event_id string yes Fathom event ID.
name string no Updated event name.
fathom.fathom_wipe_event 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_wipe_event --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
event_id string yes Fathom event ID.
fathom.fathom_delete_event 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_delete_event --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
event_id string yes Fathom event ID.
fathom.fathom_list_milestones 4 parameters
Schema command
kosmo integrations:schema fathom.fathom_list_milestones --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
limit integer no Number of milestones to return, 1-100.
starting_after string no Cursor; milestone ID to start after.
ending_before string no Cursor; milestone ID to end before.
fathom.fathom_get_milestone 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_milestone --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
milestone_id string yes Fathom milestone ID.
fathom.fathom_create_milestone 3 parameters
Schema command
kosmo integrations:schema fathom.fathom_create_milestone --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
name string yes Milestone name.
milestone_date string yes Milestone date in YYYY-MM-DD format.
fathom.fathom_update_milestone 4 parameters
Schema command
kosmo integrations:schema fathom.fathom_update_milestone --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
milestone_id string yes Fathom milestone ID.
name string no Updated milestone name.
milestone_date string no Updated milestone date in YYYY-MM-DD format.
fathom.fathom_delete_milestone 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_delete_milestone --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
milestone_id string yes Fathom milestone ID.
fathom.fathom_get_aggregate 10 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_aggregate --json
ParameterTypeRequiredDescription
site_id string yes The Fathom site ID (e.g., "CDCLS").
date_from string no Start timestamp, e.g. "2025-01-01 00:00:00".
date_to string no End timestamp, e.g. "2025-01-31 23:59:59".
metrics string no Comma-separated aggregates. Pageview values: visits, uniques, pageviews, avg_duration, bounce_rate.
group_by string no Comma-separated field grouping: hostname, pathname, referrer_hostname, country_code, browser, device_type, utm_source, etc.
sort_by string no Sort field and direction (e.g., "pageviews:desc", "uniques:asc").
limit integer no Maximum number of grouped results to return.
date_grouping string no Optional date grouping: hour, day, month, or year.
timezone string no TZ database timezone such as UTC or Europe/Brussels.
filters string no JSON array of Fathom aggregation filters.
fathom.fathom_get_current_visitors 2 parameters
Schema command
kosmo integrations:schema fathom.fathom_get_current_visitors --json
ParameterTypeRequiredDescription
site_id string yes Fathom site ID.
detailed boolean no When true, include top pages and referrers.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.