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

# Local development

> Set up the Mintlify CLI to preview Yoshi API docs locally. Includes install steps, custom ports, link validation, and troubleshooting.

<Info>
  **Prerequisites**:

  * Node.js version 19 or higher
  * This repository cloned locally
</Info>

<Steps>
  <Step title="Install the Mintlify CLI">
    ```bash theme={null}
    npm i -g mint
    ```
  </Step>

  <Step title="Preview locally">
    Navigate to this repo's root directory and run:

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

    A local preview will be available at `http://localhost:3000`.
  </Step>
</Steps>

## Custom ports

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

## Validating links

```bash theme={null}
mint broken-links
```

## Updating the CLI

```bash theme={null}
npm i -g mint@latest
```

## OpenAPI spec

The `api-reference/openapi.json` file is auto-synced from the Yoshi API via CI after each deploy. To update it manually:

```bash theme={null}
curl -sf https://api-staging.yoshi.ai/openapi.json -o api-reference/openapi.json
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Error: Could not load the &#x22;sharp&#x22; module">
    1. Remove the CLI: `npm remove -g mint`
    2. Upgrade to Node v19 or higher
    3. Reinstall: `npm i -g mint`
  </Accordion>

  <Accordion title="Unknown error on mint dev">
    Delete `~/.mintlify` and run `mint dev` again.
  </Accordion>
</AccordionGroup>
