mint analytics command gives you access to your documentation analytics from the terminal. This is useful for scripting analytics reports, piping data into other tools, and quick checks without opening the dashboard.
Prerequisites
You must log in to use analytics commands. Runmint login to authenticate with your Mintlify account.
See Preview locally for details on authentication.
View key metrics
Display a summary of views, visitors, searches, feedback, and assistant usage:--from: Start date inYYYY-MM-DDformat. Defaults to 7 days ago.--to: End date inYYYY-MM-DDformat. Defaults to today.--page: Filter to a specific page path.--humans: Show only human traffic.--agents: Show only AI traffic.
Example analytics stats flags
View search analytics
See what your users are searching for, with hit counts and click-through rates:--query: Filter by search query substring.--page: Filter to a specific page path.
Example analytics search flags
View feedback
Review feedback submitted by users on your documentation pages:--type: Aggregate feedback by page or code snippet. Defaults to page.--page: Filter to a specific page path.
Example analytics feedback flags
View assistant conversations
List recent conversations and conversation category buckets from the AI assistant:view command to see full details:
Choose an output format
All analytics commands default toplain output, which is tab-separated and suitable for piping to other tools. Use --format to change the output:
--agent flag for JSON output. The CLI auto-detects agent environments when the CLAUDECODE environment variable is 1.
Set defaults with config
To avoid repeating common flags, set defaults withmint config. The configuration saves in ~/.config/mintlify/config.json.
Available configuration keys:
| Key | Description |
|---|---|
subdomain | Default subdomain for analytics commands. |
dateFrom | Default start date for analytics queries (YYYY-MM-DD). |
dateTo | Default end date for analytics queries (YYYY-MM-DD). |
Example configs