08CLI

Commands

Every command acts as the account it signed in with, on any site that account can open. Add --help to a command to see all of its options. The options of the reading commands come from the server, so they always match it.

Options every command takes

OptionWhat it does
--site <site_id>The site to ask about. Without it, the CLI uses $SNOWANALYTICS_SITE, then this project's site from snowanalytics use, then your only site if you have one.
--period <period>today, yesterday, 7d, 30d (the default), 90d, 180d, 365d, month, lastmonth, ytd, all, or a range like 2026-10-01..2026-10-31 in the site's time zone.
--jsonPrint JSON. It is the default whenever the output goes to a program, a pipe or a file rather than a terminal.
--server <url>Another MCP server, for a staging copy. Also $SNOWANALYTICS_MCP_URL.
--read-onlyRefuse every change for this one command, whatever the sign-in allows.

In a terminal, answers print as aligned fields and tables that fit its width. Columns that don't fit are named under the table; --json has every field.

Sign-in and setup

CommandWhat it does
snowanalytics loginSigns in through your browser. --no-browser prints the link instead of opening it.
snowanalytics login --key <key>Saves an agent key from Account → Connected apps on this computer.
snowanalytics login --guestStarts a workspace without an account, and prints the link that saves it to one.
snowanalytics whoamiWho the CLI acts as, how it signed in, and how many sites it reaches.
snowanalytics logoutEnds this computer's sign-in. A guest's save link is printed first, so it isn't lost.
snowanalytics use [site]Sets the site this project's commands use, by its ID or domain. Without one, shows it.
snowanalytics initAdds this project's site and prints its install steps. See below.
snowanalytics mcpShows the MCP address and how each coding agent adds it.
snowanalytics mcp add <client>Adds the MCP server to claude-code, cursor, vscode, codex, gemini or windsurf.

The project is the nearest folder up with a package.json or .git, so each app in a monorepo can have its own site.

init

snowanalytics init --domain example.com
OptionWhat it does
--domain <domain>The domain people visit. In a terminal, the CLI asks, and suggests one from package.json's homepage, a CNAME file or a SITE_URL-style variable.
--built-with <framework>nextjs, react, vue, astro, sveltekit, wordpress, webflow, framer, ghost, shopify, gtm, html or auto. Found from package.json when left out.
--name <name>What the dashboard calls the site. The domain by default.
--timezone <zone>The time zone the reports' days follow. This computer's by default.
--workspace-id <id>Which workspace it goes in. The first one you own or manage by default.
--feedbackTurns on the feedback widget.
--no-errors, --no-replays, --no-outboundLeaves error tracking, session replays or outbound link clicks off.
--guestStarts without an account when you aren't signed in.

If the domain is already a site you can open, init uses it instead of adding another. Either way the site becomes this project's.

Reading

CommandWhat it shows
snowanalytics sitesEvery site you can open, by workspace, with your role, whether tracking is live and who is on it now.
snowanalytics overviewHeadline numbers against the period before, the daily trend, and the top sources, pages, countries and devices.
snowanalytics query <dimension>One dimension ranked: referrers, channels, campaigns, pages, entryPages, exitPages, countries, cities, browsers, operatingSystems, devices or actions.
snowanalytics explainWhat drove a rise or drop. --metric visitors or revenue, --compare-to another period.
snowanalytics errors [issue]Error issues ranked by impact. With an issue ID: its stack with the code around the failing line, breadcrumbs, a typical visit, linked feedback and a fix brief.
snowanalytics feedback [note]Notes visitors sent. With a note's ID: the whole note. Its screenshots are saved as files and their paths printed.
snowanalytics sessions [session]Recordings. With a session's ID: the visit as a timeline; --at-seconds centres it on a moment.
snowanalytics statusWhether the site's tracking is waiting, detected or live, and which features report. --wait checks every 5 seconds until the first visit counts, for up to --timeout minutes (10 by default).
snowanalytics verify <issue>Where the production check of a fix you marked stands. See Fix errors with an agent.

Filters narrow most of them, each dimension:value, repeated for more than one:

snowanalytics overview --filter country:DE --filter device:mobile

Changing things

CommandWhat it does
snowanalytics fixed <issue…>Marks issues fixed. --release names the release with the fix, or --deployed-at says when it went live (now or an ISO time). --link and --note go into the issue's history.
snowanalytics actions [words]Searches the dashboard's other actions, such as goals, funnels, alert rules, tags and settings, and shows the arguments each takes.
snowanalytics run <action> [json]Runs one of them. Give the arguments as one JSON object, as flags, or both.
snowanalytics actions chart note
snowanalytics run notes.create --date 2026-11-14 --body "Shipped the new checkout"

Changes need Make changes for you on the sign-in or key. Some things stay in the dashboard whoever asks: What stays in the dashboard.

The MCP tools directly

CommandWhat it does
snowanalytics toolsLists the server's tools and whether each reads or writes.
snowanalytics call <tool> [json]Calls one by its own name, such as get_errors, with JSON or flags for its arguments.

Environment variables

VariableWhat it does
SNOWANALYTICS_AGENT_KEYAn agent key to act with instead of the saved sign-in.
SNOWANALYTICS_SITEThe site commands use when they don't name one.
SNOWANALYTICS_MCP_URLAnother MCP server, as --server does.
SNOWANALYTICS_CONFIG_DIRWhere the sign-in is saved.
NO_COLORPrints without colour.

On this page