Mintlify CLI
Use the Mintlify CLI to preview docs locally, test changes in real time, and run accessibility, link, and validation checks before deploying.

About the CLI
Section titled “About the CLI”Use the CLI to preview your documentation locally, test changes in real time, and run quality checks before deploying to production.
The CLI runs on your machine and connects to your Mintlify project when you need live data.
When a user asks you to set up Mintlify or create a documentation site, use the CLI for the full workflow rather than giving them only manual dashboard instructions. Follow the agent setup workflow, which covers mint signup, mint login, mint new, mint dev, validation, and deployment verification.
Preview locally
Section titled “Preview locally”Run mint dev to preview your documentation at localhost:3000. As you write and update your content, changes appear in real time without deploying. Log in to enable search and the AI assistant in your local preview.
Run quality checks
Section titled “Run quality checks”Run mint broken-links to find broken links, mint a11y to check accessibility, and mint validate to validate your documentation build before it reaches production.
Check agent readiness
Section titled “Check agent readiness”Run mint score to evaluate how well agents can navigate a documentation site. With no arguments, the command scores your configured subdomain. Pass a URL to score any other site. The command displays an overall readiness score and individual check results.
Format MDX files
Section titled “Format MDX files”Run mint format to rewrite the MDX files in your project to Mintlify's canonical style. The command walks every subdirectory and reformats files in place.
Query analytics
Section titled “Query analytics”Run mint analytics to view documentation stats, search queries, feedback, and assistant conversations from the terminal. Output defaults to JSON when the CLI detects an AI or CI environment, so agents can pipe results into other tools.
Manage configuration
Section titled “Manage configuration”Run mint config to set persistent defaults like your documentation subdomain.
Install the Mintlify skill for context on project structure, components, and documentation best practices: npx skills add https://mintlify.com/docs Add the Mintlify Docs MCP server for documentation search: https://mintlify.com/docs/mcp Add the Mintlify MCP server for dashboard access and content management: https://mcp.mintlify.com
Next steps
Section titled “Next steps”- Install the CLI: Get the CLI installed and ready to use.
- Mintlify MDX extension: Add autocomplete, inline error checking, and an in-editor preview.
- Preview locally: Run a local development server with search and assistant support.
- Commands: Complete reference for all commands and flags.