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

# verial config

> View and update persistent CLI configuration.

The `verial config` commands read and write the CLI config file at `~/.verial/config.json`. Values set here apply to every invocation on this machine and can be overridden per-command via environment variables or flags.

The config file uses kebab-case keys:

| Key             | Type    | Purpose                                                                            |
| --------------- | ------- | ---------------------------------------------------------------------------------- |
| `api-key`       | string  | Organization API key. Overridden by `VERIAL_API_KEY` and `--api-key`.              |
| `base-url`      | string  | API base URL. Defaults to `https://api.verial.ai`. Overridden by `VERIAL_API_URL`. |
| `default-limit` | number  | Default `--limit` for `list` commands.                                             |
| `output-json`   | boolean | If `true`, always emit JSON. Equivalent to passing `--json` on every call.         |

## Subcommands

| Command             | Description                   |
| ------------------- | ----------------------------- |
| `verial config get` | Show the current config file. |
| `verial config set` | Set a single config key.      |

The `api-key` field is typically managed through [`verial auth set-key`](/cli/auth), but `verial config set` writes the same file.

## verial config get

Print the current contents of `~/.verial/config.json`. Returns `{}` if no config has been written.

Synopsis:

```bash theme={null}
verial config get
```

Example:

```bash theme={null}
verial config get
```

```
api-key        vk_live_abc123def456
base-url       https://api.verial.ai
default-limit  25
output-json    false
```

Pair with `--json` for machine-readable output:

```bash theme={null}
verial config get --json
```

```json theme={null}
{
  "api-key": "vk_live_abc123def456",
  "base-url": "https://api.verial.ai",
  "default-limit": 25,
  "output-json": false
}
```

## verial config set

Write a single key/value pair to the config file. The value is parsed according to the key's type (`default-limit` is parsed as an integer, `output-json` as a boolean).

Synopsis:

```bash theme={null}
verial config set --key <key> --value <value>
```

Options:

| Flag              | Description                                                   | Required |
| ----------------- | ------------------------------------------------------------- | -------- |
| `--key <key>`     | One of `api-key`, `base-url`, `default-limit`, `output-json`. | Yes      |
| `--value <value>` | Value to store. Type-parsed based on `--key`.                 | Yes      |

Examples:

```bash theme={null}
verial config set --key base-url --value https://api.staging.verial.ai
verial config set --key default-limit --value 50
verial config set --key output-json --value true
```

Unknown keys fail fast:

```bash theme={null}
verial config set --key whatever --value 1
```

```
Unknown config key: whatever. Allowed: api-key, base-url, default-limit, output-json
```

## Precedence

For each value, the CLI resolves in this order:

1. Command-line flag (e.g., `--api-key`, `--limit`, `--json`).
2. Environment variable (`VERIAL_API_KEY`, `VERIAL_API_URL`).
3. Config file at `~/.verial/config.json`.
4. Hard-coded default (for `base-url`, `https://api.verial.ai`).

## Next Steps

<CardGroup cols={2}>
  <Card title="verial auth" icon="key" href="/cli/auth">
    API key storage and inspection.
  </Card>

  <Card title="Installation" icon="download" href="/cli/installation">
    Install the CLI and verify connectivity.
  </Card>
</CardGroup>
