Feature proposal: vercel analytics command for Web Analytics in the CLI

Summary

The Vercel CLI currently has no command to view Web Analytics data for a project, such as page views, visitors, top pages, referrers, and browsers. Today, this data is only accessible in the Vercel dashboard. I’d like to propose a vercel analytics command that brings this data into the terminal.

Current state

Within packages/cli/src/commands/, there are adjacent commands like metrics, usage, logs, and traces, but none of them expose Web Analytics. Users have to leave the CLI and open the dashboard to inspect analytics, which breaks terminal-based workflows, especially for CI scripts, internal monitoring, and quick post-deploy checks.

Proposed interface

# Overview for the linked project (default: last 7 days)
vercel analytics

# Specify range and project
vercel analytics --range 30d --project my-app

# Top pages / referrers / browsers as table or JSON
vercel analytics top pages --range 30d
vercel analytics top referrers --json

# Compare current period vs previous
vercel analytics --compare

Why this would help

  • Keeps analytics access inside terminal-based workflows.
  • Enables scripting and automation through --json.
  • Reduces context switching between the CLI and dashboard.
  • Fits naturally alongside existing observability-oriented CLI commands.

Implementation notes

  • The REST API endpoints already exist under /v2/analytics/..., so this could be a relatively thin CLI wrapper over the existing API client.
  • A new analytics/ command folder under packages/cli/src/commands/ would fit the current command layout cleanly.
  • Output could follow existing CLI conventions: human-readable tables by default, with --json for scripting.

If the Vercel team is open to it, I’d be happy to contribute the implementation to the repo.