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

# ubx ai

> Manage AI feature configuration and test connectivity.

`ubx ai` manages the AI feature configuration — checking status, testing connectivity, and displaying model settings.

## Usage

```bash theme={null}
ubx ai <subcommand>
```

## Subcommands

### `ubx ai status`

Show current AI configuration:

```bash theme={null}
ubx ai status
```

```
  ◆ AI Status

  API key:        sk-ant-...KEY4  (set via UBX_AI_API_KEY)
  Model:          claude-haiku-4-5
  Plan summary:   enabled
  Cost estimate:  enabled
```

When no API key is configured:

```
  ◆ AI Status

  API key:  not set
  Status:   AI features disabled

  Set UBX_AI_API_KEY or configure ai.api_key in ubx.yaml to enable AI features.
```

### `ubx ai test`

Test connectivity to the Anthropic API:

```bash theme={null}
ubx ai test
```

```
  ✓  API key valid — claude-haiku-4-5 responding
```

## Configuration

In `ubx.yaml`:

```yaml theme={null}
ai:
  enabled: true
  api_key: "sk-ant-..."      # or set UBX_AI_API_KEY env var
  model: "claude-haiku-4-5"
  features:
    plan_summary: true
    cost_estimate: true
```

Or via environment variable:

```bash theme={null}
export UBX_AI_API_KEY=sk-ant-...
```

Environment variable takes precedence over `ubx.yaml`.
