Install the CLI
Prerequisites
- Node.js v20.17.0+ (LTS versions recommended)
Installation
Contributor commands
If you are contributing content, use these commands (via npm wrappers) to verify your work.Local preview
Run this to start a live-reloading server atlocalhost:3000.
Validation
Run this to catch structural errors or configuration issues indocs.json.
Link checking
Run this when you add or rename pages to confirm all internal paths still resolve.Maintainer commands
These commands are typically reserved for the Owner or Team to manage the documentation infrastructure.Update CLI
If the local preview differs from production, sync your CLI version:Create or scrape content
For initializing new sections or migrating documentation from external sources:Formatting
To maintain a consistent style, we recommend using the following extensions for MDX syntax highlighting and automated formatting:- Cursor / VS Code: MDX Extension and Prettier.
- JetBrains: MDX Plugin and Prettier.
Troubleshooting
Error: Could not load the 'sharp' module
Error: Could not load the 'sharp' module
This usually happens due to an outdated Node.js version.
- Uninstall:
npm uninstall -g mint - Upgrade to Node.js v20.17.0+.
- Reinstall:
npm install -g mint
Issue: Encountering an unknown error
Issue: Encountering an unknown error
Solution: Delete the
~/.mintlify folder in your user home directory and run npm run docs:dev again.Error: permission denied
Error: permission denied
This occurs if you lack global install permissions.
Solution: Use
sudo npm i -g mint on macOS/Linux, or run your terminal as Administrator on Windows.mintlify vs mint package
mintlify vs mint package
If you have both
mint and mintlify packages installed, they will conflict.
Solution:Client version shows 'none'
Client version shows 'none'
This happens when a corporate firewall or VPN blocks the CLI from downloading the client app.
Solution: Add
releases.mintlify.com to your network allowlist.Related Topics
Contribution Guide
Use the docs workflow and PR guidance when you update the site.
Testing Strategies
Validate docs-related changes and bot changes with the existing test suite.
Environment Variables
Confirm the settings that your local setup depends on.
Quickstart
Revisit the end-to-end setup path after you validate the docs locally.