mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
98996bc026
* Document --template flag for mint new command Generated-By: mintlify-agent * docs: clarify --template flag description --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Brandon McConnell <brandon@dreamthinkbuild.com>
351 lines
9.0 KiB
Plaintext
351 lines
9.0 KiB
Plaintext
---
|
|
title: "Commands"
|
|
description: "Complete reference for all Mintlify CLI commands and flags."
|
|
keywords: ["CLI", "mint", "commands", "flags", "reference"]
|
|
---
|
|
|
|
## Global flags
|
|
|
|
These flags are available on all commands.
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--telemetry`, `-t` | Enable or disable anonymous usage telemetry. |
|
|
| `--help`, `-h` | Display help for the command. |
|
|
| `--version`, `-v` | Display the CLI version. Alias for `mint version`. |
|
|
|
|
## `mint dev`
|
|
|
|
Start a local preview of your documentation.
|
|
|
|
```bash
|
|
mint dev [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--port` | Port to run the local preview on. Defaults to `3000`. |
|
|
| `--no-open` | Do not open the browser automatically. |
|
|
| `--groups` | Comma-separated list of user groups to mock for preview. |
|
|
| `--disable-openapi` | Skip OpenAPI file processing to improve performance. |
|
|
| `--local-schema` | Allow locally hosted OpenAPI files served over HTTP. |
|
|
|
|
---
|
|
|
|
## `mint login`
|
|
|
|
Authenticate with your Mintlify account.
|
|
|
|
```bash
|
|
mint login
|
|
```
|
|
|
|
Opens a browser window to complete authentication. If the browser does not open, the CLI displays a URL to open manually and a prompt to paste the authorization code. Credentials save in `~/.config/mintlify/config.json`.
|
|
|
|
If you have more than one deployment, the CLI prompts you to select a default after you log in. You can change the default project later with `mint config set subdomain <subdomain>`.
|
|
|
|
---
|
|
|
|
## `mint logout`
|
|
|
|
Remove stored credentials.
|
|
|
|
```bash
|
|
mint logout
|
|
```
|
|
|
|
---
|
|
|
|
## `mint status`
|
|
|
|
Display your current session details including CLI version, account email, organization, and configured subdomain.
|
|
|
|
```bash
|
|
mint status
|
|
```
|
|
|
|
---
|
|
|
|
## `mint analytics`
|
|
|
|
View analytics data for your documentation. Requires authentication with `mint login`.
|
|
|
|
```bash
|
|
mint analytics <subcommand> [flags]
|
|
```
|
|
|
|
All subcommands accept these shared flags:
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--subdomain` | Documentation subdomain. Defaults to the value set with `mint config set subdomain`, or the first project on your account. |
|
|
| `--from` | Start date in `YYYY-MM-DD` format. Defaults to 7 days ago, or the value set with `mint config set dateFrom`. |
|
|
| `--to` | End date in `YYYY-MM-DD` format. Defaults to today, or the value set with `mint config set dateTo`. |
|
|
| `--format` | Output format: `plain` (default), `table`, `json`, or `graph`. |
|
|
|
|
### `mint analytics stats`
|
|
|
|
Display a summary of views, visitors, searches, feedback, and assistant usage.
|
|
|
|
```bash
|
|
mint analytics stats [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--page` | Filter to a specific page path. |
|
|
|
|
### `mint analytics search`
|
|
|
|
Display search queries with hit counts and click-through rates.
|
|
|
|
```bash
|
|
mint analytics search [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--query` | Filter by search query substring. |
|
|
| `--page` | Filter by top clicked page. |
|
|
|
|
### `mint analytics feedback`
|
|
|
|
Display feedback submitted by users.
|
|
|
|
```bash
|
|
mint analytics feedback [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--type` | Feedback type: `page` (aggregate by page) or `code` (code snippet feedback). |
|
|
| `--page` | Filter to a specific page path. |
|
|
|
|
### `mint analytics conversation`
|
|
|
|
View assistant conversation data.
|
|
|
|
```bash
|
|
mint analytics conversation <subcommand> [flags]
|
|
```
|
|
|
|
#### `mint analytics conversation list`
|
|
|
|
List assistant conversations. Each entry includes a conversation ID.
|
|
|
|
```bash
|
|
mint analytics conversation list [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--page` | Filter conversations that reference a specific page in sources. |
|
|
|
|
#### `mint analytics conversation view <conversation-id>`
|
|
|
|
View a single conversation by ID. Use `mint analytics conversation list` to get IDs.
|
|
|
|
```bash
|
|
mint analytics conversation view <conversation-id>
|
|
```
|
|
|
|
#### `mint analytics conversation buckets list`
|
|
|
|
List grouped conversation categories. Each entry includes a bucket ID.
|
|
|
|
```bash
|
|
mint analytics conversation buckets list
|
|
```
|
|
|
|
#### `mint analytics conversation buckets view <bucket-id>`
|
|
|
|
View conversations in a category bucket. Use `mint analytics conversation buckets list` to get IDs.
|
|
|
|
```bash
|
|
mint analytics conversation buckets view <bucket-id>
|
|
```
|
|
|
|
---
|
|
|
|
## `mint config`
|
|
|
|
Manage persistent default values for CLI commands. The configuration saves in `~/.config/mintlify/config.json`.
|
|
|
|
```bash
|
|
mint config <subcommand> <key> [value]
|
|
```
|
|
|
|
| Subcommand | Description |
|
|
| --- | --- |
|
|
| `set <key> <value>` | Set a configuration value. |
|
|
| `get <key>` | Display a configuration value. |
|
|
| `clear <key>` | Remove a configuration value. |
|
|
|
|
### Configuration keys
|
|
|
|
| Key | Description | Used by |
|
|
| --- | --- | --- |
|
|
| `subdomain` | Default documentation subdomain. | `mint analytics` |
|
|
| `dateFrom` | Default start date for analytics queries (`YYYY-MM-DD`). | `mint analytics` |
|
|
| `dateTo` | Default end date for analytics queries (`YYYY-MM-DD`). | `mint analytics` |
|
|
|
|
---
|
|
|
|
## `mint broken-links`
|
|
|
|
Check for broken internal links in your documentation.
|
|
|
|
```bash
|
|
mint broken-links [flags]
|
|
```
|
|
|
|
The command excludes files matching [.mintignore](/organize/mintignore) patterns. Links that point to ignored files report as broken.
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--check-anchors` | Also validate anchor links (for example, `/page#section`) against heading slugs. |
|
|
| `--check-external` | Also check external URLs for broken links. |
|
|
| `--check-snippets` | Also check links inside `<Snippet>` components. |
|
|
|
|
---
|
|
|
|
## `mint a11y`
|
|
|
|
Check for accessibility issues in your documentation.
|
|
|
|
```bash
|
|
mint a11y [flags]
|
|
```
|
|
|
|
Checks color contrast ratios and missing alt text on images and videos.
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--skip-contrast` | Skip color contrast checks. |
|
|
| `--skip-alt-text` | Skip missing alt text checks. |
|
|
|
|
---
|
|
|
|
## `mint validate`
|
|
|
|
Validate your documentation build in strict mode. Exits with an error if there are any warnings or errors. Includes automatic validation of OpenAPI specifications referenced in your `docs.json`.
|
|
|
|
```bash
|
|
mint validate [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--groups` | Comma-separated list of user groups to mock for validation. |
|
|
| `--disable-openapi` | Skip OpenAPI file processing and validation. |
|
|
| `--local-schema` | Allow validation of locally hosted OpenAPI files served over HTTP. Only supports HTTPS in production. |
|
|
|
|
<Note>
|
|
The standalone `mint openapi-check` command is deprecated. Use `mint validate` instead.
|
|
</Note>
|
|
|
|
---
|
|
|
|
## `mint workflow`
|
|
|
|
Create a [workflow](/agent/workflows) file interactively.
|
|
|
|
```bash
|
|
mint workflow
|
|
```
|
|
|
|
The CLI prompts for a name, trigger type, and other settings, then creates a `.md` file in `.mintlify/workflows/`.
|
|
|
|
---
|
|
|
|
## `mint export`
|
|
|
|
Export your documentation as a self-contained zip archive for offline viewing and distribution.
|
|
|
|
```bash
|
|
mint export [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--output` | Output filename. Defaults to `export.zip`. |
|
|
| `--groups` | Comma-separated list of user groups to include restricted pages for. |
|
|
| `--disable-openapi` | Skip OpenAPI processing. |
|
|
|
|
See [Offline export](/deploy/export) for details.
|
|
|
|
---
|
|
|
|
## `mint new`
|
|
|
|
Create a new documentation project from the Mintlify starter template or a pre-defined template.
|
|
|
|
```bash
|
|
mint new [directory] [flags]
|
|
```
|
|
|
|
| Flag | Description |
|
|
| --- | --- |
|
|
| `--name` | Project name. The CLI prompts for this if not provided in interactive mode. |
|
|
| `--theme` | Project [theme](/customize/themes). The CLI prompts for this if not provided in interactive mode. |
|
|
| `--template` | Pre-defined template. The CLI prompts for this if not provided in interactive mode. |
|
|
| `--force` | Overwrite the directory without prompting. |
|
|
|
|
---
|
|
|
|
## `mint update`
|
|
|
|
Update the CLI to the latest version.
|
|
|
|
```bash
|
|
mint update
|
|
```
|
|
|
|
---
|
|
|
|
## `mint version`
|
|
|
|
Display the current CLI and client versions.
|
|
|
|
```bash
|
|
mint version
|
|
```
|
|
|
|
---
|
|
|
|
## Coming soon
|
|
|
|
These commands are available to run but are not yet functional. Running them records your interest through CLI telemetry and helps prioritize what ships next.
|
|
|
|
| Command | Description |
|
|
| --- | --- |
|
|
| `mint ai` | AI-powered documentation tools. |
|
|
| `mint test` | Documentation testing. |
|
|
| `mint signup` | Account sign-up from the CLI. |
|
|
| `mint mcp` | MCP server for documentation. |
|
|
|
|
---
|
|
|
|
## Telemetry
|
|
|
|
The CLI collects anonymous usage telemetry to help improve Mintlify. Telemetry data includes the command name, CLI version, operating system, and architecture. Mintlify does **not** collect personally identifiable information, project content, or file paths.
|
|
|
|
By default, the CLI collects telemetry data. You can opt out at any time using the `--telemetry` flag:
|
|
|
|
```bash
|
|
# Disable telemetry
|
|
mint --telemetry false
|
|
|
|
# Re-enable telemetry
|
|
mint --telemetry true
|
|
```
|
|
|
|
You can also disable telemetry by setting one of these environment variables:
|
|
|
|
| Variable | Value | Description |
|
|
| --- | --- | --- |
|
|
| `MINTLIFY_TELEMETRY_DISABLED` | `1` | Disable Mintlify CLI telemetry. |
|
|
| `DO_NOT_TRACK` | `1` | Disable telemetry using the [Console Do Not Track](https://consoledonottrack.com/) standard. |
|
|
|
|
Your preference saves in `~/.config/mintlify/config.json` and persists across CLI sessions.
|