Skip to content
Open
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
6 changes: 6 additions & 0 deletions ai/assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ Open the assistant with a URL query parameter to create deep links that guide us
- **Open with a pre-filled query**: Append `?assistant=YOUR_QUERY` to open the assistant and automatically submit a question.
- Example: [https://mintlify.com/docs?assistant=explain webhooks](https://mintlify.com/docs?assistant=explain%20webhooks)

## Test the assistant locally

You can use the assistant during local development with `mint dev`. To enable it, authenticate the CLI by running `mint login` before starting the local preview. See [Install the CLI](/installation#log-in-for-search-and-assistant) for setup instructions.

The local assistant connects to your published documentation index, so it returns the same answers as the assistant on your live site. This is useful for testing assistant behavior, custom instructions in `Assistant.md`, and UI placement without deploying.

## Troubleshooting

<Accordion title="Assistant chat bar not visible">
Expand Down
24 changes: 24 additions & 0 deletions installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,30 @@ Alternatively, if you do not want to install the CLI globally, you can run a one
npx mint dev
```

### Log in for search and assistant

By default, the local preview does not include search or the AI assistant. To enable these features during local development, authenticate the CLI with your Mintlify account:

```bash
mint login
```

This opens a browser window where you sign in with your Mintlify account. After you authenticate, the CLI stores your credentials locally so you stay logged in across sessions.

Once logged in, run `mint dev` to start the local preview with search and the [AI assistant](/ai/assistant) enabled. You can test search queries and interact with the assistant the same way your users do on your published site.

To check your authentication status:

```bash
mint status
```

To log out:

```bash
mint logout
```

### 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:
Expand Down
Loading