Query Web Analytics from the Vercel CLI
What's new
vercel metricscommand: page views, visitor counts, custom events directly from the terminal.- Filters and dimensions: filter by path, country, device, UTM source, etc.
- Agent-friendly output: structured JSON for use in Claude Code / Codex scripts.
Why it matters
For teams using AI coding agents, friction between 'write me a feature' and 'how does the new feature perform in production' is removed. Agents can autonomously verify the impact of a change without switching to a dashboard.
How to try it
npm i -g vercel@latest then vercel metrics --help. Requires Web Analytics enabled on the project.
Open original source
Vercel