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.
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:
Set defaults with config
To avoid repeating common flags, set defaults withmint config. The configuration saves in ~/.config/mintlify/config.json.
When you run mint login, the CLI sets the subdomain key. If you have multiple deployments, the CLI prompts you to choose one. You can override the default at any time with mint config set subdomain <subdomain>.
Available configuration keys:
| Key | Description |
|---|---|
subdomain | Default subdomain for analytics commands. Set by the mint login command. |
dateFrom | Default start date for analytics queries (YYYY-MM-DD). |
dateTo | Default end date for analytics queries (YYYY-MM-DD). |
Example configs