Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions installation.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "CLI installation"

Check warning on line 2 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L2

Use 'command-line tool' instead of 'CLI'.
description: "Use the CLI to preview and maintain your documentation locally"
---

Expand All @@ -14,14 +14,18 @@
alt="Decorative graphic representing the CLI."
/>

Use the CLI to preview your documentation locally as you write and edit. View changes in real-time before deploying, test your documentation site's appearance and functionality, and catch issues like broken links or accessibility problems.

Check warning on line 17 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L17

Use 'capability' or 'feature' instead of 'functionality'.

The CLI also has utilities for maintaining your documentation, including commands to rename files, validate OpenAPI specifications, and migrate content between formats.

Check warning on line 19 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L19

Use 'command-line tool' instead of 'CLI'.

<Note>
The CLI works locally once downloaded and does not require an internet connection to preview your documentation.

Check warning on line 22 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L22

Use 'command-line tool' instead of 'CLI'.

Check warning on line 22 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L22

Use 'doesn't' instead of 'does not'.
</Note>

## Install the CLI

Check warning on line 25 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L25

Use 'command-line tool' instead of 'CLI'.

<Info>
**Prerequisite**: The CLI requires [Node.js](https://nodejs.org/en) v19 or higher.

Check warning on line 28 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L28

': T' should be in lowercase.
</Info>

<Steps>
Expand All @@ -40,7 +44,7 @@

</Step>
<Step title="Preview locally">
Navigate to your docs directory (where your `docs.json` file is located) and execute the following command:

Check warning on line 47 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L47

In general, use active voice instead of passive voice ('is located').

```bash
mint dev
Expand All @@ -50,7 +54,7 @@
</Step>
</Steps>

Alternatively, if you do not want to install the CLI globally, you can run a one-time script:

Check warning on line 57 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L57

Use 'don't' instead of 'do not'.

Check warning on line 57 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L57

Use 'command-line tool' instead of 'CLI'.

```bash
npx mint dev
Expand All @@ -58,13 +62,13 @@

## Updates

If your local preview is out of sync with what you see on the web in the production version, update your local CLI:

Check warning on line 65 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L65

Use 'command-line tool' instead of 'CLI'.

```bash
mint update
```

If this `mint update` command is not available on your local version, re-install the CLI with the latest version:

Check warning on line 71 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L71

Use 'isn't' instead of 'is not'.

Check warning on line 71 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L71

Use 'command-line tool' instead of 'CLI'.

<CodeGroup>
```bash npm
Expand All @@ -78,13 +82,13 @@

## Custom ports

By default, the CLI uses port 3000. You can customize the port using the `--port` flag. To run the CLI on port 3333, for instance, use this command:

Check warning on line 85 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L85

Use 'command-line tool' instead of 'CLI'.

Check warning on line 85 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L85

Use 'command-line tool' instead of 'CLI'.

```bash
mint dev --port 3333
```

If you attempt to run on a port that is already in use, it will use the next available port:

Check warning on line 91 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L91

Use 'that's' instead of 'that is'.

Check warning on line 91 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L91

Avoid using 'will'.

```mdx
Port 3000 is already in use. Trying 3001 instead.
Expand Down Expand Up @@ -126,7 +130,7 @@
mint openapi-check <OpenAPI filename or URL>
```

Pass a filename (for example, `./openapi.yaml`) or a URL (for example, `https://petstore3.swagger.io/api/v3/openapi.json`).

Check warning on line 133 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L133

Use parentheses judiciously.

### Rename files

Expand All @@ -148,11 +152,11 @@

## Formatting

While developing locally, we recommend using extensions in your IDE to recognize and format `MDX` files.

Check warning on line 155 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L155

Try to avoid using first-person plural like 'we'.

If you use Cursor, Windsurf, or VS Code, we recommend the [MDX VS Code extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.

Check warning on line 157 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L157

Try to avoid using first-person plural like 'we'.

If you use JetBrains, we recommend the [MDX IntelliJ IDEA plugin](https://plugins.jetbrains.com/plugin/14944-mdx) for syntax highlighting, and setting up [Prettier](https://prettier.io/docs/webstorm) for code formatting.

Check warning on line 159 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L159

Try to avoid using first-person plural like 'we'.

## Troubleshooting

Expand All @@ -165,7 +169,7 @@
3. Reinstall the mint CLI: `npm install -g mint`
</Accordion>
<Accordion title="Issue: Encountering an unknown error">
**Solution**: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again.

Check warning on line 172 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L172

': G' should be in lowercase.
</Accordion>
<Accordion title="Error: permission denied">
This is due to not having the required permissions to globally install node packages.
Expand All @@ -173,12 +177,12 @@
**Solution**: Try running `sudo npm i -g mint`. You will be prompted for your password, which is the one you use to unlock your computer.
</Accordion>
<Accordion title="The local preview doesn't look the same as my docs do on the web">
This is likely due to an outdated version of the CLI.

Check warning on line 180 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L180

Use 'command-line tool' instead of 'CLI'.

**Solution:** Run `mint update` to get the latest changes.

Check warning on line 182 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L182

': R' should be in lowercase.
</Accordion>
<Accordion title="mintlify vs. mint package">
If you have any problems with the CLI package, you should first run `npm ls -g`. This command shows what packages are globally installed on your machine.

Check warning on line 185 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L185

Use 'command-line tool' instead of 'CLI'.

If you don't use npm or don't see it in the -g list, try `which mint` to locate the installation.

Expand Down