docs: document environment variables for local backend testing

This commit is contained in:
Josh Lambert
2026-03-18 13:25:41 -04:00
parent f3472af532
commit 3c48907904
+20
View File
@@ -70,6 +70,26 @@ kilo serve # Start headless API server
kilo web # Start server + open web interface
```
### Testing with a local backend
To point the CLI at a local backend (e.g., a locally running Kilo API server on port 3000), set the `KILO_API_URL` environment variable:
```bash
KILO_API_URL=http://localhost:3000 bun dev
```
This redirects all gateway traffic (auth, model listing, provider routing, profile, etc.) to your local server. The default is `https://api.kilo.ai`.
There are also optional overrides for other services:
| Variable | Default | Purpose |
| ------------------------- | -------------------------------- | ----------------------------------------- |
| `KILO_API_URL` | `https://api.kilo.ai` | Kilo API (gateway, auth, models, profile) |
| `KILO_SESSION_INGEST_URL` | `https://ingest.kilosessions.ai` | Session export / cloud sync |
| `KILO_MODELS_URL` | `https://models.dev` | Model metadata |
> **VS Code:** The repo includes a "VSCode - Run Extension (Local Backend)" launch config in `.vscode/launch.json` that sets `KILO_API_URL=http://localhost:3000` automatically.
### Pull Request Expectations
- **Issue First Policy:** All PRs must reference an existing issue.