localhost:3000.
Before you begin
Make sure you have:- Access to your documentation repository on GitHub
- Git installed on your computer
- A supported version of Node.js
- A terminal and a code editor
Check your installed versions
Clone your repository
Cloning downloads the repository and connects your local copy to GitHub. On your repository’s GitHub page, select Code and copy the HTTPS URL. Then run:ls to check that you’re in the right place. You should see docs.json and your documentation files.
If GitHub asks you to authenticate, follow its prompt. Depending on your organization, you may use a browser sign-in, a personal access token, or SSH.
Install the Mintlify CLI
Install the CLI globally so themint command is available from any documentation project:
npx mint in place of mint.
Start a local preview
From the directory that containsdocs.json, run:
http://localhost:3000. Leave the command running while you work. When you save a file, the preview reloads with your changes.
If port 3000 is already in use, the CLI chooses another available port and prints its address in the terminal.
Make a test edit
Open an MDX page and change a sentence. Save the file, then check the local preview. Before committing anything, inspect what changed:git status lists changed and untracked files. git diff shows the exact line-by-line edits that you haven’t staged yet. Together, they help you catch an accidental change before it reaches a commit.
You can now restore the sentence or keep it for the workflow lesson.
Common setup problems
mint: command not found
Restart your terminal after installing the CLI. If the command still isn’t available, use npx mint dev or check where npm installs global packages.
The preview says it can’t find docs.json
Run pwd and ls. You probably started the command from the wrong directory.
GitHub rejects your clone or push
Confirm that you have access to the repository and that GitHub authentication is working. If you can clone but can’t push, you may have read access instead of write access.
Next up: Workflow overview — turn your local edit into a branch, commit, pull request, preview, and published update.