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

# Commands

> Full reference for every ontora CLI command.

The CLI is grouped by resource. Run `ontora <group> --help` for in-terminal docs on any command.

## `ontora auth`

API key and connection management.

### `auth login`

Save an API key (and optional defaults) to `~/.ontora/config.yaml`.

```bash theme={null}
ontora auth login --api-key ont_live_... [--workspace WS_ID] [--base-url URL]
```

| Flag              | Required | Description                                     |
| ----------------- | -------- | ----------------------------------------------- |
| `--api-key`, `-k` | yes      | Your Ontora API key (starts with `ont_`)        |
| `--workspace`     | no       | Default workspace id used when commands omit it |
| `--base-url`      | no       | Override the API host (e.g. for staging)        |

### `auth status`

```bash theme={null}
ontora auth status
```

Calls `/health` and prints whether your saved key works.

## `ontora campaigns`

Manage interview campaigns.

```bash theme={null}
ontora campaigns list [-w WS_ID] [--status STATUS]
ontora campaigns show INTERVIEW_ID
ontora campaigns create -c campaign.yaml [-w WS_ID] [--start]
ontora campaigns start INTERVIEW_ID
ontora campaigns pause INTERVIEW_ID
```

| Command  | Notes                                                                            |
| -------- | -------------------------------------------------------------------------------- |
| `list`   | `--status` filters by `draft`, `active`, `paused`, or `completed`                |
| `show`   | Prints campaign metadata and progress                                            |
| `create` | Reads a [campaign YAML](/cli/campaign-yaml). Add `--start` to launch immediately |
| `start`  | Move from `draft` → `active`                                                     |
| `pause`  | Pause an active campaign                                                         |

## `ontora contacts`

Manage contacts on a campaign.

```bash theme={null}
ontora contacts list INTERVIEW_ID [--status STATUS]
ontora contacts add INTERVIEW_ID --name "Sam Rivera" \
    [--email sam@example.com] [--phone +1...] \
    [--job-title "Shift Lead"] [--department Operations] [--seniority 4]
ontora contacts import INTERVIEW_ID contacts.csv
```

| Command  | Notes                                                                                                     |
| -------- | --------------------------------------------------------------------------------------------------------- |
| `list`   | Lists contacts and their conversation status                                                              |
| `add`    | Adds a single contact. Only `--name` is required                                                          |
| `import` | Bulk import from a CSV file (positional path). Columns: `name,email,phone,job_title,department,seniority` |

## `ontora transcripts`

```bash theme={null}
ontora transcripts list INTERVIEW_ID
ontora transcripts get INTERVIEW_ID CONVERSATION_ID [-f md|json] [-o transcript.md]
ontora transcripts export INTERVIEW_ID [-o transcripts.zip]
```

| Command  | Notes                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------ |
| `list`   | Lists conversations in a campaign                                                                |
| `get`    | Fetch one transcript. `--format` defaults to `md`. `--output` writes to a file instead of stdout |
| `export` | Bundle every transcript into a ZIP (defaults to `transcripts.zip` in cwd)                        |

## `ontora reports`

```bash theme={null}
ontora reports show INTERVIEW_ID
ontora reports export INTERVIEW_ID [-k report|summary] [-o report.md]
```

| Command  | Notes                                                                                                                       |
| -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `show`   | Print the dashboard summary as Markdown to stdout                                                                           |
| `export` | `--kind report` (default) is the full synthesis report; `--kind summary` is the dashboard view. `--output` writes to a file |

## `ontora query`

Run a GraphRAG query over a campaign's transcripts.

```bash theme={null}
ontora query INTERVIEW_ID "What are the most painful manual steps in scheduling?"
```

Both arguments are positional and required. The CLI prints the answer plus structured patterns and divergences. For finer control (anonymization, top-k), call the [REST endpoint](/guides/query-with-graphrag) directly.

## `ontora webhooks`

Outbound webhook endpoints.

```bash theme={null}
ontora webhooks list [-w WS_ID]
ontora webhooks add URL [--events "synthesis.completed,interview.completed"] \
    [--description "Production sync"] [-w WS_ID]
ontora webhooks test ENDPOINT_ID
ontora webhooks remove ENDPOINT_ID
ontora webhooks deliveries ENDPOINT_ID [-n 25]
```

| Command      | Notes                                                                           |
| ------------ | ------------------------------------------------------------------------------- |
| `list`       | Lists workspace subscriptions                                                   |
| `add`        | `--events` is a comma-separated string. Empty/omitted = subscribe to all events |
| `test`       | Sends a synthetic event to the endpoint                                         |
| `remove`     | Deletes the subscription                                                        |
| `deliveries` | Lists recent delivery attempts. `-n` defaults to 25                             |

## `ontora version`

```bash theme={null}
ontora version
```

Prints the installed CLI version.

## Environment variables

| Variable              | Overrides                            |
| --------------------- | ------------------------------------ |
| `ONTORA_API_KEY`      | API key from `~/.ontora/config.yaml` |
| `ONTORA_BASE_URL`     | API host                             |
| `ONTORA_WORKSPACE_ID` | Default workspace id                 |

These take priority over the saved config — use them in CI to avoid storing credentials on disk.
