Skip to main content
To install the CLI, see Install the CLI.

Global flags

These flags are available on all commands.

mint dev

Start a local preview of your documentation.

mint signup

Create a new Mintlify account from an interactive terminal.
Run the command without flags to enter your details interactively. The CLI prompts for any value you do not pass as a flag. After you submit your details, Mintlify sends a verification link to your email. The command waits until you click the link, then creates your account, signs you in, and stores your credentials. When it finishes, open the dashboard to connect your repository and start building.
mint signup does not return until you click the verification link, which can take several minutes.When an AI agent runs mint signup, or the command runs without an interactive terminal, it prints the agent signup guide instead of creating an account. Agents create sites without an account through Agent signup.

Examples


mint deploy

Create a site without an account and get Git push access to it. For the full flow, see Agent signup.
Run the command again from the same directory to get a fresh write token for the same site. In GitHub Actions, mint deploy pushes the checked-out commit to a site that trusts the repository. The workflow needs the id-token: write permission.

Examples


mint claim

Claim a site created with mint deploy.
Run mint claim --email to get a claim link. After the site owner opens the link and signs in, run mint claim --code with the code from the claim page. --email and --code can’t be combined.

Examples


mint login

Authenticate with your Mintlify account.
Opens a browser window to complete authentication. If the browser does not open, the CLI displays a URL to open manually and a prompt to paste the authorization code. Credentials save in ~/.config/mintlify/config.json. If you have more than one project, the CLI prompts you to select a default after you sign in. You can change the default project later with mint config set subdomain <subdomain>.

mint logout

Remove stored credentials.

mint status

Display your current session details including CLI version, account email, organization, and configured subdomain.

mint add-domain

Add a custom domain to your project from the terminal. Requires authentication with mint login.
The command uses your configured subdomain from mint config. If you do not have a configured subdomain, it uses the first subdomain on your account. After registering the domain, the CLI waits up to 10 seconds for DNS records to generate, then prints the TXT and CNAME records to add at your domain provider:
Add the TXT records first, then add the CNAME once the verification records validate. See Custom domain for full DNS setup instructions, apex domain requirements, and TLS provisioning details. If the command fails with Domain is already in use by another deployment in your organization or Domain is already claimed by another organization, the domain is bound to another Mintlify project. See Add domain fails with “Domain is already claimed by another organization” to release it and re-add it.
If some TXT records are still generating when the command exits, check the Custom domain setup page in your dashboard for the remaining values.
When you pass --basePath, the CLI saves the base path after registering the domain. The new path takes effect on your next deploy, and your site continues serving from the current path until then. The CNAME sends all traffic on the domain to Mintlify, so only add it if the domain hosts nothing else. Otherwise, keep your existing DNS and set up a reverse proxy to Mintlify for the base path. See Host docs at a subpath for provider-specific guides.

Examples

Add a custom domain at the root:
Add a custom domain and serve your documentation at /docs:

mint analytics

Query documentation analytics from the terminal. Requires authentication with mint login.
Analytics require a Pro or Enterprise plan.
All subcommands accept these shared flags:

mint analytics stats

Display top-line KPIs for a date range: views, visitors, searches, feedback, and assistant usage. The output reports human and agent traffic separately.
Display search queries with hit counts, click-through rates, top clicked page, and last searched date.

mint analytics feedback

Display user feedback. By default, returns individual feedback entries. Pass --type page to see feedback aggregated by page path, or --type code to only include feedback on code snippets.

mint analytics conversation

View assistant conversation analytics.

mint analytics conversation list

List recent assistant conversations with timestamp, first user query, and category.

mint analytics conversation view

View the full message thread for a single conversation.

mint analytics conversation buckets list

List clusters of conversations grouped by topic, with the number of conversations and the most recent question date for each cluster.

mint analytics conversation buckets view

List the individual threads in a conversation bucket.

Examples


mint agent setup

Set up AI coding agents to work on your Mintlify project. The command installs Mintlify skills and configures the admin MCP for Claude Code, Codex, or Cursor.
mint agent setup requires Node.js 22.20 or later and npm.
Without an interactive terminal, the command configures the agents it detects. If it detects none, pass --agent. The command adds an MCP server named mintlify-admin with the URL https://mcp.mintlify.com to each agent’s configuration file. If your Codex configuration defines mcp_servers as an inline table, setup can’t add an entry to it and stops with an error. Add a mintlify-admin entry with url = "https://mcp.mintlify.com" to the inline table yourself. If CLAUDE_CONFIG_DIR is set, --global setup for Claude Code stops with an error. Add the server with the Claude Code CLI instead:
Setup keeps your existing configuration and skips an agent that already has a matching mintlify-admin entry. If a mintlify-admin entry has a different configuration, or a configuration file can’t be parsed, setup stops before it installs skills. Rename or remove the conflicting entry, then run the command again. Rerunning the command refreshes the installed skills and replaces any local edits you made to them. The command does not sign you in to the admin MCP or reuse your mint login credentials. After setup, complete the OAuth sign-in in each agent. The command prints the steps for each agent you configured.

Examples


mint instructions

Print step-by-step guidance for a task in Mintlify, written for AI coding agents. Each topic covers a common job, such as publishing a new site or adding a custom domain. It lists the steps, the rules agents commonly get wrong, and how to verify the result. Your agent can run the command before it starts a task instead of relying on its training data. The CLI fetches each topic from the live Mintlify documentation, so the guidance stays current without a CLI update.
Without a topic, the command lists the available topics and when to use each one. With a topic, it prints that topic’s instructions as Markdown. Start with overview. The command needs an internet connection. If a topic doesn’t exist, the command exits with an error. Run mint instructions to see valid topics. If your installed CLI doesn’t recognize the command, run mint update or use npx mint@latest instructions.

Examples


mint config

Manage persistent default values for CLI commands. The configuration saves in ~/.config/mintlify/config.json.

Configuration keys


Check for broken internal links in your documentation.
The command scans .mdx and .md files for links and excludes files matching .mintignore patterns. Links inside OpenAPI specification files (.yaml, .yml, .json) are not checked. Links that point to ignored files report as broken. The command checks Markdown links and images, including reference-style links such as [text][id]. It also checks the href of <a> and <Card> components and the src of <img> and <source> tags, whether written as a plain string or as a fixed value in braces, such as href={"/quickstart"}. Values computed from variables are not checked. Links without a leading /, such as quickstart or ../quickstart, resolve from the directory of the page that contains them, the same way a browser resolves them. To link from the root of your site, start the path with /. For links without a leading / and anchor links (#) inside a snippet, the command checks each page that renders the snippet. The command reports one of these links only if it is broken on at least one of those pages. With --check-anchors, headings inside a snippet count as anchors on the pages that render it. Pass --files to limit the check to specific pages. This is useful for validating a single page you just edited or scoping checks to a directory in CI. When --files is set with --check-external, only external URLs on the selected pages are fetched.

mint a11y

Check for accessibility issues in your documentation.
Checks color contrast ratios and missing alt text on images and videos.

mint validate

Check your documentation for errors, then validate the build in strict mode. Includes automatic validation of OpenAPI specifications referenced in your docs.json.
mint validate runs a set of rules against your pages, snippets, navigation, and OpenAPI specifications, then runs a strict build. Findings print grouped by file, with the line, column, and rule name for each one when available. The duplicate-h1, katex, and foreign-syntax rules report warnings, so their findings don’t fail the run. The other rules report errors. The strict build runs only when no rule reports an error and at least one selected rule needs the build. If a rule reports an error, the command skips the build and tells you to fix the errors first. Warnings that the build can’t attribute to a rule fail the run as build-failed errors. With --fix, mint validate runs up to five fix passes, because one fix can unlock another. For example, self-closing a <br> can let a page parse. After the last pass, every rule runs once more and the report shows what remains. The output lists each applied fix as fixed <file>:<line> <rule>: "before" → "after". --fix skips a fix that overlaps another fix in the same file. It also leaves a Markdown or MDX file unchanged if the fixed content would parse worse than before. Without --fix, the output ends with a count of the issues that --fix would fix.
Commit or stash your changes before you run --fix, so you can review its edits.
With --format json, progress output is hidden and other console output goes to stderr, so you can parse stdout directly. The report has these fields:
  • passed: true when no rule reported an error.
  • summary: errors and warnings counts, plus byRule with a count for each rule ID.
  • diagnostics: each finding, with rule, group, severity (error or warning), file, optional line and column, message, and an optional fix.
  • build: { "ran": true, "passed": <boolean> } if the strict build ran, otherwise { "ran": false, "reason": <reason> } with a reason of disabled, errors found, or no build rules.
  • fixed: only with --fix. Each applied change, with rule, file, optional line and column, before, and after.
If mint validate can’t run, it prints nothing on stdout and writes Error: <message> to stderr. The command exits with one of these codes:
  • 0: No rule reported an error. Warnings don’t fail the run.
  • 1: At least one rule reported an error.
  • 2: mint validate could not run, for example because of an unknown rule name, a --files value that matches no pages or snippets, or a crash.
Use mint validate instead of the deprecated standalone mint openapi-check command.

mint og

Render the social preview (OG) image for a page to a PNG file. The command uses your docs.json thumbnails settings, page and section thumbnail overrides, and the same rendering code as your live site.
The command prints warnings when the title is too long to fit on two lines, when no logo is configured or the logo fails to load, when the font fails to load, and when text has low contrast on a brand surface. Warnings don’t change the exit code. The command exits with code 1 if docs.json is invalid or the page doesn’t exist.

mint export

Export your documentation as a self-contained zip archive for offline viewing and distribution.
See Offline export for details.

mint score

Run agent readiness checks against a public documentation site. Requires authentication with mint login.
The command displays an overall readiness score and a breakdown of individual checks with pass/fail indicators.

Examples

Checks

The score evaluates the following areas: Some checks only run if a check they depend on passes. If a check fails, none of the checks that depend on it run. They automatically fail. For example, llmsTxtValid only passes if llmsTxtExists passes first. The overall score uses weighted scoring, so higher-impact checks contribute more to your score.

mint format

mint format rewrites files in place. Commit or stash your changes before running it so you can review the diff.
Format every .mdx file in the current directory to Mintlify’s canonical style. The command parses each file with the same MDX parser the web editor uses, then rewrites it in place if the canonical output differs.
Run the command from the root of your docs project. It walks every subdirectory, skipping paths matched by .gitignore and any Mintlify ignore rules. Files that already match the canonical output are left untouched.
Running mint format can result in many changes depending on the size of your project. To avoid merge conflicts and introducing changes to other in progress work, first resolve all important pending branches. Then create a new branch for formatting changes and run mint format on that branch.
When it finishes, the command prints how many MDX files were reformatted and how many failed to parse. If any file fails, the command exits with code 1 and prints the file path and error, so you can run it in CI to enforce consistent formatting. See Install in CI for an example pipeline.

mint migrate

Print step-by-step instructions for migrating an existing documentation site to Mintlify or pass the instructions to an AI agent to complete the migration.
Without flags, the command prints an overview of the migration workflow followed by the available topics and source platforms. The instructions are written for coding agents, so you can paste them into your agent or let your agent run mint migrate itself. With --agent, the CLI launches the specified agent’s command-line tool with a prompt to run mint migrate and follow the instructions it prints. You must already have the agent’s CLI installed. If the Mintlify CLI can’t find the agent CLI, mint migrate exits with an error that includes the install command.

Examples


mint new

Create a new documentation project by picking a theme or cloning a pre-defined template from the mintlify/templates repository.

mint update

Update the CLI to the latest version.

mint version

Display the current CLI and client versions.

Coming soon

These commands are available to run but are not yet functional. Running them records your interest through CLI telemetry and helps prioritize what ships next.

Telemetry

The CLI collects usage telemetry to help improve Mintlify. Telemetry data includes the command name, CLI version, operating system, architecture, and Node.js version. It also records whether the CLI runs in a CI environment, whether it runs in an interactive terminal, whether this is the first time the CLI has run on your machine, and whether you are signed in. If the CLI detects an AI coding agent running it, telemetry also includes the agent’s name. Each event also includes a session identifier that groups events from the same working session. The CLI stores it in ~/.config/mintlify/telemetry-session.json and replaces it after 30 minutes of inactivity. If you are signed in, telemetry events also include your account email address. Signed-out usage stays anonymous, and signing out removes your stored email. Mintlify does not collect project content or file paths. By default, the CLI collects telemetry data. You can opt out at any time using the --telemetry flag:
You can also disable telemetry by setting one of these environment variables: Your preference saves in ~/.config/mintlify/config.json and persists across CLI sessions.