npm.io
4.3.91 • Published 16h ago

mintlify

Licence
Elastic-2.0
Version
4.3.91
Deps
0
Vulns
0
Weekly
112.0K
Mintlify

mint

The Mintlify CLI
Write, preview, check, and publish your docs from the terminal.

npm version Monthly downloads Node.js 20.17 or later Follow Mintlify on X

Quickstart  ·  Command reference  ·  Dashboard  ·  Changelog


Quickstart

1. Install the CLI

npm i -g mint

2. Create a docs site

mint new my-docs
cd my-docs

3. Preview it locally

mint dev

Your site opens at localhost:3000 and reloads as you edit.

4. Ship it

Push the folder to GitHub and connect the repository in the dashboard. Every push to your default branch deploys.

Requirements: Node.js 20.17 or later. LTS versions are recommended; Node 25 is not supported.


Commands

Write and preview
Command What it does
mint new Scaffold a new docs site
mint dev Preview locally with live reload
mint format Format your MDX files
mint og Render a page's social preview image
mint migrate Guide a migration from another docs platform
Check
Command What it does
mint validate Content, OpenAPI, and strict build checks for CI
mint broken-links Find broken links, anchors, and redirects
mint a11y Check color contrast and alt text
mint score Check how agent-ready a live docs site is
Publish
Command What it does
mint add-domain <domain> Add a custom domain and get its DNS records
mint export Export a static zip for air-gapped hosting
Insights and automation
Command What it does
mint analytics Query views, searches, feedback, and assistant chats
mint automations Create, list, and delete automations
AI agents
Command What it does
mint agent setup Connect Claude Code, Codex, or Cursor to Mintlify
mint instructions Print Mintlify workflow instructions for agents
mint deploy Provision a site with no account and get push instructions
mint claim Move a mint deploy site into a Mintlify account
Account and CLI
Command What it does
mint signup / mint login Create an account or sign in from the browser
mint status / mint logout See who you're signed in as, or sign out
mint config set <key> <value> Save defaults like subdomain, dateFrom, dateTo
mint update Update the CLI to the latest version
mint version Print the CLI and client versions

Run mint <command> --help for every flag, or read the full command reference.


Command details

mint dev  Local preview

Run from the folder that contains your docs.json.

mint dev
mint dev --port 3333 --no-open
mint dev --groups admin beta
Flag Description Default
--port <number> Port for the preview. Tries the next free port if taken 3000
--no-open Don't open the browser
--host Expose the preview on your local network
--groups <group...> Preview as readers in these user groups
--signed-in Preview as a signed-in reader with no groups
--disable-openapi Skip OpenAPI processing for faster startup
--disable-prefetch Turn off navigation prefetching on very large sites
--multi-repo Compose docs from several local repositories
mint validate  One check for CI

Runs content rules and OpenAPI checks, then a strict build. Exits 0 when clean, 1 on errors, and 2 if validation couldn't run.

mint validate
mint validate --no-build --format json
mint validate --files "guides/**/*.mdx" --fix
Flag Description
--files <glob...> Limit page checks to these files or globs
--no-build Skip the strict build for a fast, offline check
--fix Apply available fixes and check again
--disable <rules> Turn off rules or groups, for example --disable openapi
--enable <rules> Turn rules back on, for example after --disable all
--format json Print a single JSON report for scripts and agents
--groups <group...> Validate as readers in these user groups
mint broken-links  Link checker
mint broken-links
mint broken-links --check-anchors --check-external
mint broken-links --links-to /guides/setup
Flag Description
--files <glob...> Only check these files or globs
--check-anchors Also check #section links against heading slugs
--check-external Also check external URLs
--check-snippets Also check links inside <Snippet> components
--check-redirects Also check that docs.json redirects point to real pages
--links-to <page> List every internal link that points to a page instead
mint og  Social preview images

Renders a page's OG image with the same code as your live site, using the thumbnails settings in docs.json.

mint og guides/webhooks
mint og --preset headline --surface brand
mint og --output og.png --no-open
Flag Description
--preset <name> Try a preset without editing docs.json
--surface <name> Try a surface without editing docs.json
--appearance <name> Try an appearance without editing docs.json
--output <path> Where to write the PNG
--no-open Don't open the image after rendering
mint analytics  Docs analytics in your terminal

Requires mint login and a Pro or Enterprise plan.

mint analytics stats --from 2026-01-01
mint analytics search --format graph
mint analytics feedback --type page --format json
mint analytics conversation list

Every subcommand accepts --subdomain, --from, --to, and --format <table|plain|json|graph>.

mint export  Air-gapped hosting
mint export
mint export --output docs.zip --base-path /docs
Flag Description Default
--output <path> Output zip file export.zip
--base-path <path> Path prefix the export is served under
--groups <group...> Export as readers in these user groups
--disable-openapi Skip OpenAPI file generation

The zip includes a serve.js server and a README.md with the rules for hosting it yourself.

mint agent setup  Skills and MCP for coding agents

Installs Mintlify skills and configures the Admin MCP for Claude Code, Codex, or Cursor. Requires Node.js 22.20 or later.

mint agent setup
mint agent setup --agent claude-code codex cursor
mint agent setup --agent codex --global

Setup applies to the current project by default; --global configures your user account. After setup, finish the OAuth sign-in inside each agent.


Run checks in CI

name: Docs
on: pull_request

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v5
        with:
          node-version: 22
      - run: npx mint validate
      - run: npx mint broken-links --check-anchors

Troubleshooting

If mint dev isn't working, try these in order:

  1. Run it from the folder that contains your docs.json.
  2. Run mint update to get the latest CLI.
  3. Check that you're on Node.js 20.17 or later, and not Node 25.
  4. Delete the contents of the ~/.mintlify folder and run mint dev again.

Still stuck? Ask in GitHub Discussions.


Mintlify

Built with ︎ by Mintlify  ·  Create a free account  ·  Licensed under Elastic License 2.0

Keywords