1. Development
  • npm

  • yarn

Using the npm package manager

Terminal
npm i -g mintlify

Previewing Changes Locally

Run the following command at the root of your documentation where mint.json is located. Mintlify will open at localhost:3000.

Running Mintlify
mintlify dev

Custom Ports

Mintlify uses port 3000 by default. You can use the --port flag to customize the port Mintlify runs on. For example, use this command to run in port 3333:

Running Mintlify with a custom port
mintlify dev --port 3333

You will see an error like this if you try to run Mintlify in a port that’s already taken:

Example error message when port is busy
Error: listen EADDRINUSE: address already in use :::3000

Mintlify Versions

Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production.

Troubleshooting

Here’s how to solve some common problems when working with the CLI.

Curious about what changed in a CLI version? Check out the CLI changelog.