The 5 best analytics CLIs for builders in 2026
The five analytics CLIs builders are actually using in 2026 — Eyepup, the PostHog CLI, posthog-toolbox, plausible-cli, and umami-cli. This is a practical comparison: every tool below is something you can npm install -g, eyepup ask-style query from Claude Code or Cursor, and pipe through jq. No "enterprise BI agentic analytics" — those don't ship a CLI. If you're a builder who lives in the terminal, this is the shortlist.
Why CLI-first analytics matters in 2026
Two things changed in 2026 that made the dashboard the wrong primary surface:
- Coding agents read terminal output. Claude Code, Cursor (integrated terminal), Codex, GitHub Copilot CLI all consume your shell context. If your analytics lives behind a dashboard URL, the agent has to either screenshot it (lossy) or scrape an API (brittle). If your analytics lives in
eyepup ask, the agent reads it likegit log. - The auto-loop demands write-back. "Watch → Research → Rank → Ship → Measure" only closes the loop if the agent can write the deploy back to the analytics layer. CLIs are pipeable both ways; dashboards are read-only walls.
The five tools below all clear the bar of being CLI-native enough to live inside an agent's loop. They differ wildly in what they tell you.
1. Eyepup — the only one that writes a verdict per visitor
npm i -g eyepup then eyepup login. The marquee command is eyepup ask — natural language goes in, an LLM-grounded answer with evidence + ranked actions comes out:
$ eyepup ask "why are people bouncing from /pricing?"
What makes Eyepup different from the rest of this list is that it doesn't return aggregate metrics. It returns a profile per visitor — heat score (0-100), persona, blocked-by reason, recommended action — and a friction-pattern To-Do queue you can pipe straight into Claude Code:
$ eyepup todo --limit 1 | claude -p
Other useful commands:
eyepup hottest— top 5 high-intent visitors right noweyepup visitors --flag high_intent --hours 24— filtered visitor listeyepup visitor <distinct_id>— full dossier with session evidenceeyepup log "Rewrote /pricing CTA" --kind content_change --paths /pricing— write-back so the agent reasons about whether the next batch of visitors recovered
Verdict: best in class if your goal is "feed visitor behaviour into a coding agent and ship the fix." Worst if you need 12-month aggregate reporting in Looker.
2. PostHog CLI (posthog-cli)
PostHog has a first-party CLI that ships features beyond what their dashboard exposes — feature flags, event ingestion testing, project switching:
$ npm i -g posthog-cli
$ posthog-cli flags list
$ posthog-cli events list --event "$pageview" --limit 50
Strengths: deep coverage of the PostHog API, scriptable for CI use cases (toggle a flag from a deploy script). Weaknesses: it's a thin wrapper over the dashboard's data model, so the answer is always "here's what happened in aggregate." No per-visitor narrative, no fix recommendation.
If you already run PostHog and want a CLI for ops tasks, this is the one. If you want a CLI that thinks for you, see #1.
3. posthog-toolbox
A community CLI that fills the gap PostHog itself doesn't — running ad-hoc HogQL queries from your terminal:
$ npx posthog-toolbox query "select count() from events where event = 'signup' group by toDate(timestamp)"
Strengths: piping HogQL output to jq, awk, or csvq is genuinely good. Useful for debugging an event pipeline without opening the UI. Weaknesses: you have to know HogQL. Not LLM-friendly out of the box — the output is rows, not narrative.
Pair with eyepup ask for the question, then drop to posthog-toolbox for the precise count.
4. plausible-cli
Plausible Analytics has a small but cleanly designed CLI:
$ npm i -g plausible-cli
$ plausible site:metrics --site yoursite.com --period 7d
$ plausible site:goals --site yoursite.com
Strengths: privacy-first, no cookies, EU-hosted. Numbers are honest (no bot traffic inflation). The CLI mirrors their API one-to-one. Weaknesses: aggregate-only. There's no "tell me about this visitor" — Plausible by design doesn't track at the visitor level.
Use Plausible if you have to be cookieless. Pair with Eyepup for the per-visitor view that Plausible can't structurally produce.
5. umami-cli
Umami is the open-source dashboard a lot of indie hackers self-host. The community CLI gives you scriptable access:
$ npx umami-cli stats --website-id $UMAMI_SITE_ID --period 7d
Strengths: works offline if you self-host. Output is structured JSON, easy to pipe. Weaknesses: same limitation as Plausible — visitor-level data isn't there because Umami's data model doesn't capture it. The CLI is also a community project, not first-party.
Use it if you self-host Umami and want quick stats from your terminal.
Honorable mentions
- Google Analytics CLI —
ga-cliexists but the GA4 schema is hostile enough that the CLI is barely used in practice. Most teams write a Python script with the GA4 client library when they need scripted access. - Mixpanel CLI — Mixpanel ships a query CLI, but it's geared at data engineers, not builders. Strong for cohort analysis, weak for "tell me what to ship next."
- Amplitude CLI — exists for ingestion testing only. No reporting.
How to pick
| If your goal is | Use | |---|---| | Feed visitor behaviour into Claude Code / Cursor / Codex and ship a fix | Eyepup | | Toggle PostHog flags from a deploy script | PostHog CLI | | Run ad-hoc HogQL queries on your event pipeline | posthog-toolbox | | Cookieless aggregate metrics in 100 chars | plausible-cli | | Self-hosted privacy-first dashboard with terminal access | umami-cli |
The honest answer for most builders: install Eyepup for the agent loop and Plausible for the cookieless aggregate view, and you've covered both surfaces. The other tools are excellent at narrower jobs.
What's coming in 2026 H2
Two things to watch:
- MCP-native analytics — every tool in this list is exploring whether to ship a Model Context Protocol server so coding agents can call them as tools without CLI piping. Eyepup and PostHog have public roadmaps; Plausible and Umami have community discussions but nothing committed. CLI piping works today; MCP will compress the round-trip when it lands.
- Per-page agent recommendations becoming standard — the auto-loop pattern (Eyepup, Felix AI from Quantum Metric, parts of Quantum Metric's competitor stack) is going from Eyepup-specific to a category default. Expect every analytics tool to ship "the next fix" output by end of year.
Pick the tool whose primary output is the shape your coding agent actually consumes. Everything else is a dashboard cosplaying as a CLI.
If you're building with Claude Code, Cursor, or Codex and want to feed visitor behaviour into your agent's loop, start with Eyepup — npm i -g eyepup then eyepup login. First profile lands in under two minutes.
