Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,29 @@ OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

## Verifying your configuration

The CLI checks for required environment variables before making a call. Run a quick check:
!!! tip "Verify your setup"
Run `call-use doctor` to check all variables are set and LiveKit is reachable. See the [CLI guide](../guides/cli.md#call-use-doctor) for full details.

```bash
call-use dial "+18001234567" -i "Test" 2>&1 | head -5
call-use doctor
```

If any variables are missing, you will see a clear error message listing what is needed:
If everything is configured correctly you will see all green checks:

```
Missing required environment variables:
LIVEKIT_URL — LiveKit server URL (wss://...)
SIP_TRUNK_ID — Twilio SIP trunk ID in LiveKit
✓ LIVEKIT_URL set
✓ LIVEKIT_API_KEY set
✓ LIVEKIT_API_SECRET set
✓ SIP_TRUNK_ID set
✓ OPENAI_API_KEY set
✓ DEEPGRAM_API_KEY set
✓ LiveKit connection OK

7 passed, 0 failed
```

If any variables are missing, doctor will flag them with ✗ and exit with code 1.

## Starting the worker

Before making calls, start the call-use worker process in a separate terminal:
Expand Down
51 changes: 51 additions & 0 deletions docs/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,57 @@ call-use dial PHONE [OPTIONS]
| `--timeout` | | `int` | `600` | Max call duration in seconds |
| `--approval-required` | | flag | `False` | Require interactive approval for sensitive actions |

### `call-use doctor`

Check that all required environment variables are set and that LiveKit is reachable. This is the fastest way to verify your setup before making a call.

```bash
call-use doctor
```

The command checks six environment variables (`LIVEKIT_URL`, `LIVEKIT_API_KEY`, `LIVEKIT_API_SECRET`, `SIP_TRUNK_ID`, `OPENAI_API_KEY`, `DEEPGRAM_API_KEY`) and then attempts to connect to your LiveKit server.

**Example output (all configured):**

```
✓ LIVEKIT_URL set
✓ LIVEKIT_API_KEY set
✓ LIVEKIT_API_SECRET set
✓ SIP_TRUNK_ID set
✓ OPENAI_API_KEY set
✓ DEEPGRAM_API_KEY set
✓ LiveKit connection OK

7 passed, 0 failed
```

**Example output (partial configuration):**

```
✓ LIVEKIT_URL set
✓ LIVEKIT_API_KEY set
✓ LIVEKIT_API_SECRET set
✗ SIP_TRUNK_ID missing
✗ OPENAI_API_KEY missing
✓ DEEPGRAM_API_KEY set
✗ LiveKit connection failed: ...

3 passed, 4 failed
```

**When to use it:**

- After first-time setup, to confirm every credential is in place.
- When a call fails unexpectedly, to rule out configuration issues.
- In CI, as a smoke test before running integration tests.

**Exit codes:**

| Code | Meaning |
|------|---------|
| `0` | All checks passed |
| `1` | One or more checks failed |

### `call-use --version`

Print the installed version.
Expand Down
Loading