analytics
Fathom Analytics CLI for Cron Jobs
Use the Fathom Analytics CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
6 functions 6 read 0 write Bearer token auth
Fathom Analytics CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. The Fathom Analytics CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Fathom Analytics CLI for Cron Jobs
kosmokrator integrations:configure fathom --set access_token="$FATHOM_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call fathom.fathom_list_sites '{"limit":1,"starting_after":1}' --json Discovery Before Execution
Agents and scripts can inspect Fathom Analytics docs and schemas before choosing a function.
kosmo integrations:docs fathom --json
kosmo integrations:docs fathom.fathom_list_sites --json
kosmo integrations:schema fathom.fathom_list_sites --json
kosmo integrations:search "Fathom Analytics" --json
kosmo integrations:list --json Useful Fathom Analytics CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
fathom.fathom_list_sites | Read | limit, starting_after | List all websites tracked in Fathom Analytics. Returns site IDs, names, and domains you can query for analytics data. |
fathom.fathom_get_site | Read | site_id | Get details for a specific Fathom Analytics site by ID. Returns site name, domain, tracking code, and other configuration. |
fathom.fathom_list_pageviews | Read | site_id, date_from, date_to, limit, starting_after | List pageviews for a Fathom Analytics site with date filtering and pagination. Returns individual pageview records including URL, referrer, and device info. |
fathom.fathom_get_aggregate | Read | site_id, date_from, date_to, metrics, group_by, sort_by, limit | Get aggregated analytics data from Fathom. Supports pageviews, visits, visitors, bounce rate, and more. Can group results by page, country, browser, device type, etc. |
fathom.fathom_list_events | Read | site_id, limit, starting_after | List custom events tracked in Fathom Analytics for a site. Returns event names, event IDs, and configuration details. |
fathom.fathom_get_current_user | Read | none | Get the currently authenticated Fathom user profile. Returns user name, email, and account details. Useful for verifying API connectivity. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.