> ## Documentation Index
> Fetch the complete documentation index at: https://smartac-justin-client-exports.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mintlify CLI

> 使用 Mintlify CLI 在本地预览文档、实时测试更改，并在部署前运行无障碍、链接和验证检查。

<img className="block dark:hidden my-0 pointer-events-none" src="https://mintcdn.com/smartac-justin-client-exports/QlrKc4ncwGdmwz1Z/images/installation/local-development-light.png?fit=max&auto=format&n=QlrKc4ncwGdmwz1Z&q=85&s=2dc57a7f28f51d89dbe8966558861dd1" alt="代表 CLI 的装饰图形。" width="1184" height="320" data-path="images/installation/local-development-light.png" />

<img className="hidden dark:block my-0 pointer-events-none" src="https://mintcdn.com/smartac-justin-client-exports/QlrKc4ncwGdmwz1Z/images/installation/local-development-dark.png?fit=max&auto=format&n=QlrKc4ncwGdmwz1Z&q=85&s=8bc9b3a58a707987dcba3590d48fb739" alt="代表 CLI 的装饰图形。" width="1184" height="320" data-path="images/installation/local-development-dark.png" />

<div id="about-the-cli">
  ## 关于 CLI
</div>

使用 [CLI](https://www.npmjs.com/package/mint) 在本地预览文档、实时测试更改，并在部署到生产环境前运行质量检查。

CLI 在你的本地机器上运行，在需要实时数据时连接到你的 Mintlify 部署。

<div id="preview-locally">
  ### 本地预览
</div>

运行 `mint dev` 在 `localhost:3000` 预览你的文档。在你编写和更新内容时，更改会实时显示，无需部署。登录后可在本地预览中启用搜索和 AI 助手。

<div id="run-quality-checks">
  ### 运行质量检查
</div>

运行 `mint broken-links` 查找断链，`mint a11y` 检查无障碍性，`mint validate` 在发布到生产环境前验证文档构建。

<div id="check-agent-readiness">
  ### 检查代理就绪性
</div>

运行 `mint score` 评估代理在文档站点上的导航能力。不带参数时，该命令将对你配置的子域名进行评分。传入 URL 可评分任意其他站点。该命令显示总体就绪性评分和各项检查结果。

<div id="manage-configuration">
  ### 管理配置
</div>

运行 `mint config` 设置持久的默认值，如文档子域名。

<Tip>
  使用 AI 编程工具在本地开发文档？安装 Mintlify [skill](/zh/ai/skillmd) 和 [MCP 服务器](/zh/ai/model-context-protocol)，让你的编辑器具备编写符合 Mintlify 规范内容所需的上下文。
</Tip>

<Prompt description="Install the Mintlify skill and MCP servers for AI coding tools." actions={["copy", "cursor"]}>
  Install the Mintlify skill for context on project structure, components, and documentation best practices:

  npx skills add [https://mintlify.com/docs](https://mintlify.com/docs)

  Add the Mintlify Docs MCP server for documentation search:

  [https://mintlify.com/docs/mcp](https://mintlify.com/docs/mcp)

  Add the Mintlify MCP server for dashboard access and content management:

  [https://mcp.mintlify.com](https://mcp.mintlify.com)
</Prompt>

<div id="next-steps">
  ## 后续步骤
</div>

* [安装 CLI](/zh/cli/install)：安装并准备好 CLI。
* [本地预览](/zh/cli/preview)：运行支持搜索和助手的本地开发服务器。
* [命令参考](/zh/cli/commands)：所有命令和选项的完整参考。
