Install the CLI to preview and develop your docs locally
Install the CLI.
Preview locally.
docs.json
file is located) and execute the following command:http://localhost:3000
.mint update
command is not available on your local version, re-install the CLI with the latest version:
--port
flag. To run the CLI on port 3333, for instance, use this command:
mint dev
is the most commonly used command, there are other commands you can use to manage your documentation.
./openapi.yaml
) or a URL (e.g. https://petstore3.swagger.io/api/v3/openapi.json
).
MDX
files.
If you use Cursor, Windsurf, or VSCode, we recommend the MDX VSCode extension for syntax highlighting, and Prettier for code formatting.
If you use JetBrains, we recommend the MDX IntelliJ IDEA plugin for syntax highlighting, and setting up Prettier for code formatting.
Error: Could not load the "sharp" module using the darwin-arm64 runtime
npm uninstall -g mint
npm install -g mint
Issue: Encountering an unknown error
~/.mintlify
folder. Afterwards, run mint dev
again.Error: permission denied
sudo npm i -g mint
. You will be prompted for your password, which is the one you use to unlock your computer.The local preview doesn't look the same as my docs do on the web
mint update
to get the latest changes.mintlify vs. mint package
npm ls -g
. This command shows what packages are globally installed on your machine.If you have a package named mint
and a package named mintlify
installed, you should uninstall mintlify
.