Development
Preview changes locally to update your docs
Prerequisites:
- Node.js version 19 or higher
- A docs repository with a
docs.jsonfile
Follow these steps to install and run Mintlify on your operating system.
Install the Mintlify CLI
npm i -g mintPreview locally
Navigate to your docs directory where your docs.json file is located, and run the following command:
mint devA local preview of your documentation 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 3333If 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.Mintlify 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 updateValidating links
The CLI can assist with validating links in your documentation. To identify any broken links, use the following command:
mint broken-linksDeployment
If the deployment is successful, you should see the following:

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
Curious about what changed in the latest CLI version? Check out the CLI changelog.