Skip to content
Closed
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
43 changes: 41 additions & 2 deletions installation.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Install the CLI"
description: "Use the CLI to preview docs locally, test changes in real-time, and catch issues before deploying your documentation site."
keywords: ["CLI", "npm", "local development", "Node.js", "pnpm", "mint dev", "broken links", "accessibility"]
keywords: ["CLI", "npm", "local development", "Node.js", "pnpm", "mint dev", "broken links", "accessibility", "export", "air-gapped", "offline"]
---

<img
Expand All @@ -17,7 +17,7 @@

Use the [CLI](https://www.npmjs.com/package/mint) to preview your documentation locally as you write and edit. View changes in real-time before deploying, test your documentation site's appearance and features, and catch issues like broken links or accessibility problems.

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

## Prerequisites

Expand Down Expand Up @@ -228,6 +228,45 @@
- `--groups [groupname]`: Mock user groups for validation (useful when testing group-based access control)
- `--disable-openapi`: Disable OpenAPI file generation during validation

### Export a static site

Export your documentation as a self-contained static site for air-gapped or offline deployment:

```bash
mint export
```

This command builds your documentation and packages it into a zip file containing pre-rendered HTML pages, static assets, and a built-in server. The exported site runs entirely offline with no dependency on Mintlify's servers.

The zip file includes:
- Pre-rendered HTML for every page in your documentation
- All static assets (JavaScript, CSS, images, fonts)
- A Node.js server (`serve.js`) for serving the site locally
- Launcher scripts for macOS/Linux (`Start Docs.command`) and Windows (`Start Docs.bat`)

To use the exported site, unzip the file and either double-click the appropriate launcher script for your platform or run `node serve.js` directly. The site opens in your default browser at `http://localhost:3000`.

<Note>
Node.js must be installed on the machine serving the exported site. The first time you run `mint export`, an internet connection is required to download the build client.

Check warning on line 250 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L250

In general, use active voice instead of passive voice ('be installed').

Check warning on line 250 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L250

In general, use active voice instead of passive voice ('is required').
</Note>

| Flag | Description |
| --- | --- |
| `--output` | Set the output zip file path. Defaults to `export.zip`. |
| `--groups` | Mock user groups for the export (useful when exporting group-specific content). |
| `--disable-openapi` | Disable OpenAPI file generation during export. |

```bash
# Export to a custom filename
mint export --output docs.zip

# Export with specific user group content
mint export --groups admin

# Export without OpenAPI processing
mint export --disable-openapi
```

### Check OpenAPI spec

Check your OpenAPI file for errors with the following command:
Expand All @@ -245,7 +284,7 @@
```

<Note>
Only HTTPS URLs are supported in production deployments. The `--local-schema` flag is for local development only.

Check warning on line 287 in installation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

installation.mdx#L287

In general, use active voice instead of passive voice ('are supported').
</Note>

### Create a workflow
Expand Down
Loading