> ## Documentation Index
> Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview locally

> Run a local preview of your Mintlify documentation site with live reload, full-text search, and AI assistant support using mint dev.

## Start the local preview

Navigate to your documentation directory containing your `docs.json` file and run:

```bash theme={null}
mint dev
```

The local preview starts at `http://localhost:3000`. As you edit, changes appear in real time.

By default, the preview opens automatically in your browser. To prevent the browser from opening, use the `--no-open` flag:

```bash theme={null}
mint dev --no-open
```

To generate a preview without installing the CLI globally, run:

```bash theme={null}
npx mint dev
```

## Log in for search and assistant

You must authenticate the CLI with your Mintlify account to enable search and the [assistant](/assistant/index).

```bash theme={null}
mint login
```

After you authenticate with the `mint login` command, the CLI stores your credentials in `~/.config/mintlify/config.json` so you stay logged in across sessions. The CLI also prompts you to select a default project, which commands like `mint analytics` use.

Once logged in, run `mint dev` to start the local preview with search and the assistant enabled. The assistant uses the same indexed content as your deployed documentation site.

To check your authentication status, run:

```bash theme={null}
mint status
```

To log out, run:

```bash theme={null}
mint logout
```

## Custom ports

By default, the CLI uses port 3000. To use a different port, use the `--port` flag:

```bash theme={null}
mint dev --port 3333
```

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

## Skip OpenAPI processing

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

```bash theme={null}
mint dev --disable-openapi
```

## Preview as a specific group

If you use group-based access control, preview as a specific authentication group with the `--groups` flag:

```bash theme={null}
mint dev --groups admin
```

See [Authentication setup](/deploy/authentication-setup#control-access-with-groups) for more information on groups.


## Related topics

- [Mintlify CLI](/docs/cli/index.md)
- [Analyze your documentation](/docs/cli/analytics.md)
- [Quickstart](/docs/quickstart.md)
