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

# CLI Overview

> Install and use the Know Your AI CLI to run security evaluations, inspect products, and review results from your terminal.

The **Know Your AI CLI** (`know-your-ai` / `kya`) lets you run security evaluations, inspect product configurations, and review results — all from your terminal. It's built on top of the `@know-your-ai/evaluate` SDK.

## Installation

<Tabs>
  <Tab title="npm (recommended)">
    ```bash theme={null}
    npm install -g @know-your-ai/cli
    ```
  </Tab>

  <Tab title="Shell script">
    ```bash theme={null}
    curl -fsSL https://knowyourai.hydrox.ai/cli/install.sh | bash
    ```

    The installer verifies Node.js >= 18, installs the package globally, and checks that the binary is on your `$PATH`.
  </Tab>
</Tabs>

After installation, both `know-your-ai` and `kya` commands are available:

```bash theme={null}
know-your-ai --version
kya --version
```

## Configuration

The CLI requires a single environment variable:

```bash theme={null}
export KNOW_YOUR_AI_DSN="https://kya_xxx:da2-xxx@api.knowyourai.hydrox.ai/your-product-id"
```

Get your DSN from the [Know Your AI dashboard](https://knowyourai.hydrox.ai) → **Settings → API Keys**.

<Tip>Add the DSN to your shell profile (`.bashrc`, `.zshrc`, etc.) so it's always available.</Tip>

## Verify setup

Run `doctor` to validate your configuration and test connectivity:

```bash theme={null}
kya doctor
```

```
Know Your AI CLI
AI Security Testing & Evaluation

✔ KNOW_YOUR_AI_DSN environment variable is set
✔ DSN format is valid
    Host: api.knowyourai.hydrox.ai
    Product ID: prod-abc-123
✔ API key format is valid (kya_xxxx...)
✔ API connection successful
✔ Evaluations: Found 5 evaluations
✔ Datasets: Found 12 datasets

All checks passed! Your configuration is working correctly.
```

The doctor command performs 6 checks:

1. **DSN set** — verifies `KNOW_YOUR_AI_DSN` env var exists
2. **DSN format** — parses the DSN and shows host & product ID
3. **API key** — checks key starts with `kya_`
4. **API connection** — tests authentication against the backend
5. **Evaluations** — lists evaluations and reports count
6. **Datasets** — lists datasets and reports count

## Commands

| Command               | Alias             | Description                                  |
| --------------------- | ----------------- | -------------------------------------------- |
| `kya doctor`          | —                 | Validate configuration and test connectivity |
| `kya target`          | —                 | Show product configuration                   |
| `kya list`            | `ls`              | List evaluations and datasets                |
| `kya evaluate <id>`   | `eval`            | Run an evaluation                            |
| `kya describe <id>`   | —                 | Show evaluation details                      |
| `kya history`         | —                 | Show recent run history                      |
| `kya result <run-id>` | —                 | Show results for a specific run              |
| `kya help`            | `--help`, `-h`    | Show help                                    |
| `kya version`         | `--version`, `-v` | Show version                                 |

See [Commands Reference](/cli/commands) for detailed documentation of every command.

## Quick workflow

```bash theme={null}
# 1. Check connectivity
kya doctor

# 2. See what's available
kya list

# 3. Inspect an evaluation before running
kya describe eval-abc-123

# 4. Run it
kya evaluate eval-abc-123

# 5. Check history
kya history

# 6. See detailed results
kya result run-xyz-789
```

## What's next

<CardGroup cols={2}>
  <Card title="Commands Reference" icon="terminal" href="/cli/commands">
    Detailed documentation for every CLI command with examples.
  </Card>

  <Card title="Evaluate SDK" icon="code" href="/sdk/evaluate">
    Use the SDK for programmatic evaluations in CI/CD pipelines.
  </Card>
</CardGroup>
