Skip to main content
The 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. Run mint 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:
mint analytics stats
Use flags to filter by date range, page, or traffic source:
  • --from: Start date in YYYY-MM-DD format. Defaults to 7 days ago.
  • --to: End date in YYYY-MM-DD format. Defaults to today.
  • --page: Filter to a specific page path.
  • --humans: Show only human traffic.
  • --agents: Show only AI traffic.
Example analytics stats flags
mint analytics stats --from 2025-01-01 --to 2025-01-31
mint analytics stats --page /quickstart
mint analytics stats --humans
mint analytics stats --agents

View search analytics

See what your users are searching for, with hit counts and click-through rates:
mint analytics search
Use flags to filter by query string or page:
  • --query: Filter by search query substring.
  • --page: Filter to a specific page path.
Example analytics search flags
mint analytics search --query "authentication"

mint analytics search --page /api-reference

View feedback

Review feedback submitted by users on your documentation pages:
mint analytics feedback
Use flags to aggregate feedback by page, or filter to code snippet feedback:
  • --type: Aggregate feedback by page or code snippet. Defaults to page.
  • --page: Filter to a specific page path.
Example analytics feedback flags
mint analytics feedback --type page
mint analytics feedback --type code

View assistant conversations

List recent conversations and conversation category buckets from the AI assistant:
mint analytics conversation list
mint analytics conversation buckets list
Each list output includes an ID for each entry. Pass that ID to the corresponding view command to see full details:
mint analytics conversation view <conversation-id>
mint analytics conversation buckets view <bucket-id>

Choose an output format

All analytics commands default to plain output, which is tab-separated and suitable for piping to other tools. Use --format to change the output:
mint analytics stats --format table    # Pretty-printed table with colors
mint analytics stats --format json     # Raw JSON
mint analytics stats --format graph    # Horizontal bar chart
Use the --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 with mint config. The configuration saves in ~/.config/mintlify/config.json. Available configuration keys:
KeyDescription
subdomainDefault subdomain for analytics commands.
dateFromDefault start date for analytics queries (YYYY-MM-DD).
dateToDefault end date for analytics queries (YYYY-MM-DD).
Example configs
mint config set subdomain my-docs
mint config set dateFrom 2025-01-01
Once set, analytics commands use these values automatically:
# Uses the configured subdomain and dateFrom without flags
mint analytics stats
To view or clear a value, run:
mint config get subdomain
mint config clear subdomain