diff --git a/ai/assistant.mdx b/ai/assistant.mdx index b16a02fa3..bae8f5e04 100644 --- a/ai/assistant.mdx +++ b/ai/assistant.mdx @@ -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) +## Local development + +The assistant is available in local development when you are logged into the CLI. Run `mint login` to authenticate, then start your local preview with `mint dev`. The assistant uses your published documentation's indexed content during local development. + +See [Search and assistant in local preview](/installation#search-and-assistant-in-local-preview) for setup instructions. + ## Troubleshooting diff --git a/installation.mdx b/installation.mdx index 68eca503e..f947d1ffe 100644 --- a/installation.mdx +++ b/installation.mdx @@ -95,6 +95,28 @@ Alternatively, if you do not want to install the CLI globally, you can run a one npx mint dev ``` +### Search and assistant in local preview + +Log in to the CLI to enable search and the [AI assistant](/ai/assistant) during local development. Run `mint login` to authenticate with your Mintlify account: + +```bash +mint login +``` + +After logging in, search and the assistant are available in your local preview. The assistant uses the same configuration and indexed content as your published documentation site. + +To check your current 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: