Skip to main content
Internal maintainer guide: This page is for the Krypton team maintaining documentation infrastructure.Prerequisites:
  • Node.js version 19 or higher
  • A docs repository with a docs.json file
Follow these steps to preview, validate, and ship documentation updates.
1

Install the Mintlify CLI

npm i -g mint
2

Preview locally

Navigate to your docs directory where your docs.json file is located, and run the following command:
mint dev
A local preview of the Krypton docs will be available at http://localhost:3000.

Custom ports

By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the --port flag. For example, to run Mintlify on port 3333, use this command:
mint dev --port 3333
If you attempt to run Mintlify on a port that’s already in use, it will use the next available port:
Port 3000 is already in use. Trying 3001 instead.

CLI versions

Please note that each CLI release is associated with a specific version of Mintlify. If your local preview does not align with the production version, please update the CLI:
npm mint update
The CLI can assist with validating links in your documentation. To identify any broken links, use the following command:
mint broken-links

Deployment

After you push changes, verify deployment checks are green in your repository provider before sharing docs URLs.

Code formatting

We suggest using extensions on your IDE to recognize and format MDX. If you’re a VSCode user, consider the MDX VSCode extension for syntax highlighting, and Prettier for code formatting.

Troubleshooting

This may be due to an outdated version of node. Try the following:
  1. Remove the currently-installed version of the CLI: npm remove -g mint
  2. Upgrade to Node v19 or higher.
  3. Reinstall the CLI: npm i -g mint
Solution: Go to the root of your device and delete the ~/.mintlify folder. Then run mint dev again.
For CLI release notes, check the Mint CLI package page.