Prerequisites
- Node.js v20.17.0+ (LTS versions recommended)
Install the CLI
Create a new project
To create a new documentation project from the Mintlify starter template, run the following command:| Flag | Description |
|---|---|
--name | Project name. The CLI prompts for this if not provided. |
--theme | Project theme. The CLI prompts for this if not provided. |
--force | Overwrite the current directory without prompting. |
--name and --theme flags.
Update
If your local preview is out of sync with your deployed documentation, update the CLI to the latest version:mint update is not available on your version, reinstall the CLI with the latest version:
Formatting
For syntax highlighting and code formatting in MDX files, we recommend using the following extensions:- Cursor, Windsurf, VS Code: MDX VS Code extension and Prettier
- JetBrains: MDX IntelliJ IDEA plugin and Prettier
Troubleshooting
Error: Could not load the "sharp" module using the darwin-arm64 runtime
Error: Could not load the "sharp" module using the darwin-arm64 runtime
This may be due to an outdated version of Node.js. Try the following:
- Remove the currently installed version of the mint CLI:
npm uninstall -g mint - Upgrade to Node.js v20.17.0+.
- Reinstall the mint CLI:
npm install -g mint
Issue: Encountering an unknown error
Issue: Encountering an unknown error
Solution: Go to the root of your device and delete the
~/.mintlify folder. Afterwards, run mint dev again.Error: permission denied
Error: permission denied
This is due to not having the required permissions to globally install node packages.Solution: Try running
sudo npm i -g mint. When prompted, enter the password that you use to unlock your computer.The local preview doesn't look the same as my docs do on the web
The local preview doesn't look the same as my docs do on the web
This is likely due to an outdated version of the CLI.Solution: Run
mint update to get the latest changes.mintlify versus mint package
mintlify versus mint package
If you have any problems with the CLI package, first run
npm ls -g to see what packages are globally installed. If you don’t use npm, try which mint to locate the installation.If you have both a mint and a mintlify package installed, uninstall mintlify:Client version shows 'none' after installation
Client version shows 'none' after installation
If you run
mint version and the client version displays as none, the CLI may be unable to download the client application due to a corporate firewall or VPN.Solution: Ask your IT administrator to add releases.mintlify.com to your network allowlist.