title | description |
---|---|
Development |
Learn how to preview changes locally |
Step 1. Install Mintlify on your OS:
```bash npm npm i -g mintlify ```yarn global add mintlify
Step 2. Go to the docs are located (where you can find mint.json
) and run the following command:
mintlify dev
The documentation website is now available at http://localhost:3000
.
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:
mintlify dev --port 3333
You will see an error like this if you try to run Mintlify in a port that's already taken:
Error: listen EADDRINUSE: address already in use :::3000
Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production.
```bash npm npm i -g mintlify@latest ```yarn global upgrade mintlify
You should see the following if the deploy successfully went through:
Here's how to solve some common problems when working with the CLI.
Update to Node v18. Run `mintlify install` and try again. Go to the `C:/Users/Username/.mintlify/` directory and remove the `mint` folder. Then Open the Git Bash in this location and run `git clone https://github.com/mintlify/mint.git`.Repeat step 3.
Curious about what changed in a CLI version? Check out the CLI changelog.