Files
Ethan Palm 5b2a80cdc3 Mintlify MDX extension (#7108)
* docs: document the Mintlify MDX VS Code extension

Add a page for the Mintlify MDX extension (mintlify.mintlify-snippets),
which had no coverage outside a 2024 changelog entry describing its
snippets-only predecessor.

Covers autocomplete, diagnostics, hover docs, go-to-definition,
docs.json schema validation, the in-editor preview panel, surround
snippets, all four settings, and all five commands, verified against
the shipped v2.0.0 manifest and bundle.

Replace the unifiedjs.vscode-mdx recommendation in cli/install.mdx.
Our extension warns users to disable that one, so the previous
guidance routed them into a known conflict.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: accept all prefetch word forms in Vale vocabulary

The vocabulary had a bare `prefetching` entry, so `prefetches` and
`prefetched` in cli/preview.mdx were flagged as misspellings. Vale
wraps entries in \b, so the bare form matches only that one variant.

Use `(?i)prefetch(es|ed|ing)?` rather than the uncased suffix pattern
used by neighboring entries. An uncased entry also generates a
case-enforcing Vale.Terms rule, which would flag a sentence-initial
"Prefetching" as an error. "prefetch" has no canonical capitalization
worth enforcing, so the non-enforcing form avoids a latent false
positive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* rename page

* 💅

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 15:12:12 -07:00

60 lines
3.3 KiB
Plaintext

---
title: "Mintlify CLI"
description: "Use the Mintlify CLI to preview docs locally, test changes in real time, and run accessibility, link, and validation checks before deploying."
keywords: ["CLI", "mint", "local development", "preview"]
---
import SkillMcpPrompt from "/snippets/skill-mcp-prompt.mdx";
<img
className="block dark:hidden my-0 pointer-events-none"
src="/images/installation/local-development-light.png"
alt="Decorative graphic representing the CLI."
/>
<img
className="hidden dark:block my-0 pointer-events-none"
src="/images/installation/local-development-dark.png"
alt="Decorative graphic representing the CLI."
/>
## About the CLI
Use the [CLI](https://www.npmjs.com/package/mint) 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 deployment when you need live data.
<Visibility for="agents">
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](/quickstart#set-up-mintlify-for-the-user), which covers `mint signup`, `mint login`, `mint new`, `mint dev`, validation, and deployment verification.
</Visibility>
### 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
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
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
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
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
Run `mint config` to set persistent defaults like your documentation subdomain.
<Tip>
Working on your docs locally with an AI coding tool? Install the Mintlify [skill](/ai/skillmd) and [Model Context Protocol (MCP) server](/ai/model-context-protocol) so your editor has the context it needs to write Mintlify-aware content. Run [`mint index`](/cli/commands#mint-index) to give supported agents a context tool for researching external libraries, frameworks, SDKs, APIs, and CLI tools.
</Tip>
<SkillMcpPrompt />
## Next steps
- [Install the CLI](/cli/install): Get the CLI installed and ready to use.
- [Mintlify MDX extension](/cli/mdx-extension): Add autocomplete, inline error checking, and an in-editor preview.
- [Preview locally](/cli/preview): Run a local development server with search and assistant support.
- [Commands](/cli/commands): Complete reference for all commands and flags.