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

# Installation

> Install the Dino CLI and create your first config file.

## Prerequisites

* **Node.js >= 22**: Check with `node --version`.

## Install

<Steps>
  <Step title="Install the CLI">
    <Tabs>
      <Tab title="npm (global)">
        ```bash theme={null}
        npm install -g @dino-hq/cli
        ```
      </Tab>

      <Tab title="npx (no install)">
        ```bash theme={null}
        npx @dino-hq/cli scan
        ```

        Run any command without a global install. Useful for CI or one-off scans.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify the install">
    ```bash theme={null}
    dino --version
    ```
  </Step>

  <Step title="Create a config file">
    ```bash theme={null}
    dino init
    ```

    The interactive setup prompts you for your endpoint, protocol, authentication settings, output format, and whether to enable AI reasoning. It writes a `.dino.yml` in your current directory.

    Or create one manually:

    ```yaml .dino.yml theme={null}
    endpoint: https://api.example.com/graphql
    protocol: graphql
    ```

    Two lines. That's the minimum to run `dino scan`.
  </Step>
</Steps>

## Config file search order

Dino uses [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig) to find your config:

| File                                            | Format             |
| ----------------------------------------------- | ------------------ |
| `.dino.yml` / `.dino.yaml`                      | YAML (recommended) |
| `.dinorc`                                       | JSON or YAML       |
| `.dinorc.json` / `.dinorc.yaml` / `.dinorc.yml` | JSON / YAML        |
| `package.json` (`"dino"` key)                   | JSON               |

<Warning>
  **No** `.js `**/** `.ts `**config files.** Executable configuration files are blocked for security reasons. Use YAML or JSON only.
</Warning>

## Environment variables

| Variable         | Description                                                 |
| ---------------- | ----------------------------------------------------------- |
| `DINO_AI_KEY`    | API key for AI reasoning (alternative to `aiKey` in config) |
| `DINO_API_TOKEN` | Auth token for authenticated scans                          |

Never put secrets in `.dino.yml` Use environment variables.

## Validate your config

```bash theme={null}
dino validate
```

Checks your config against Dino's schema and reports field-level errors.

<Info>
  See the full [config reference](/config/dino-yml) for all available fields.
</Info>

## Next steps

<Card title="Quick Start" icon="rocket" href="/quickstart">
  Run your first API scan in under 5 minutes.
</Card>
