Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
| Flag | Description |
| --- | --- |
| `--port` | Port to run the local preview on. Defaults to `3000`. |
| `--host` | Expose the local preview on your network. Without this flag, the preview is only available at `localhost`. |
| `--no-open` | Do not open the browser automatically. |
| `--groups` | Space-separated list of user groups to mock for preview. For example, `--groups admin user`. |
| `--signed-in` | Preview as a signed-in reader with no groups. Use `--groups` to preview as specific groups. Without either flag, the preview shows the signed-out view. |
Expand Down Expand Up @@ -144,7 +145,7 @@

Add the `TXT` records first, then add the `CNAME` once the verification records validate. See [Custom domain](/customize/custom-domain) for full DNS setup instructions, apex domain requirements, and TLS provisioning details.

If the command fails with `Domain is already in use by another deployment in your organization` or `Domain is already claimed by another organization`, the domain is bound to another Mintlify project. See [Add domain fails with "Domain is already claimed by another organization"](/help-center/domain-already-claimed-by-another-organization) to release it and re-add it.

Check warning on line 148 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L148

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

<Note>
If some `TXT` records are still generating when the command exits, check the [Custom domain setup](https://app.mintlify.com/settings/project/custom-domain) page in your dashboard for the remaining values.
Expand Down Expand Up @@ -191,7 +192,7 @@

### `mint analytics stats`

Display top-line KPIs for a date range: views, visitors, searches, feedback, and assistant usage. The output reports human and agent traffic separately.

Check warning on line 195 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L195

Did you really mean 'KPIs'?

```bash
mint analytics stats [flags]
Expand Down Expand Up @@ -332,7 +333,7 @@

The command scans `.mdx` and `.md` files for links and excludes files matching [.mintignore](/organize/mintignore) patterns. Links inside OpenAPI specification files (`.yaml`, `.yml`, `.json`) are not checked. Links that point to ignored files report as broken.

Relative links (`./`, `../`) and anchor links (`#`) inside a snippet are checked against each page that renders the snippet. The command reports one of these links only if it is broken on at least one of those pages. With `--check-anchors`, headings inside a snippet count as anchors on the pages that render it.

Check warning on line 336 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L336

In general, use active voice instead of passive voice ('are checked').

Check warning on line 336 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L336

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

| Flag | Description |
| --- | --- |
Expand All @@ -342,7 +343,7 @@
| `--check-redirects` | Also check that redirect destinations in `docs.json` resolve to valid paths. |
| `--check-snippets` | Also check that snippet import paths resolve to existing files. |

Pass `--files` to limit the check to specific pages. This is useful for validating a single page you just edited or scoping checks to a directory in CI. When `--files` is set with `--check-external`, only external URLs on the selected pages are fetched.

Check warning on line 346 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L346

In general, use active voice instead of passive voice ('are fetched').

```bash
# Check a specific page
Expand Down Expand Up @@ -412,9 +413,9 @@
| `--surface` | Try a surface (`brand` or `neutral`) without editing `docs.json`. |
| `--appearance` | Try an appearance (`light` or `dark`) without editing `docs.json`. |
| `--output` | Where to write the PNG. Defaults to a temporary file. |
| `--no-open` | Don't open the image after rendering. The command also skips opening it when the `CI` environment variable is set. |

Check warning on line 416 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L416

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

The command prints warnings when the title is too long to fit on two lines, when no logo is configured or the logo fails to load, when the font fails to load, and when text has low contrast on a `brand` surface. Warnings don't change the exit code. The command exits with code `1` if `docs.json` is invalid or the page doesn't exist.

Check warning on line 418 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L418

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

```bash
# Render one page and open it
Expand Down Expand Up @@ -521,13 +522,13 @@
mint format
```

Run the command from the root of your docs project. It walks every subdirectory, skipping paths matched by `.gitignore` and any Mintlify ignore rules. Files that already match the canonical output are left untouched.

Check warning on line 525 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L525

In general, use active voice instead of passive voice ('are left').

<Tip>
Running `mint format` can result in many changes depending on the size of your project. To avoid merge conflicts and introducing changes to other in progress work, first resolve all important pending branches. Then create a new branch for formatting changes and run `mint format` on that branch.
</Tip>

When it finishes, the command prints how many MDX files were reformatted and how many failed to parse. If any file fails, the command exits with code `1` and prints the file path and error, so you can run it in CI to enforce consistent formatting. See [Install in CI](/cli/install#install-in-ci) for an example pipeline.

Check warning on line 531 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L531

In general, use active voice instead of passive voice ('were reformatted').

---

Expand Down Expand Up @@ -581,7 +582,7 @@

## Telemetry

The CLI collects usage telemetry to help improve Mintlify. Telemetry data includes the command name, CLI version, operating system, architecture, and Node.js version. It also records whether the CLI runs in a CI environment, whether it runs in an interactive terminal, whether this is the first time the CLI has run on your machine, and whether you are signed in. If the CLI detects an AI coding agent running it, telemetry also includes the agent's name. If you are signed in, telemetry events also include your account email address. Signed-out usage stays anonymous, and signing out removes your stored email. Mintlify does **not** collect project content or file paths.

Check warning on line 585 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L585

In general, use active voice instead of passive voice ('are signed').

Check warning on line 585 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L585

In general, use active voice instead of passive voice ('are signed').

By default, the CLI collects telemetry data. You can opt out at any time using the `--telemetry` flag:

Expand Down
10 changes: 10 additions & 0 deletions cli/preview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ mint dev --port 3333

If the port is already in use, the CLI automatically tries the next available port.

## Preview on other devices

By default, the local preview only accepts connections from your own computer at `localhost`. To open the preview on a phone or another computer on your network, use the `--host` flag:

```bash
mint dev --host
```

The CLI then prints a network URL that other devices on the same network can open.

## Skip OpenAPI processing

If you have many OpenAPI files, skip OpenAPI processing during local development to improve performance with the `--disable-openapi` flag:
Expand Down
Loading