mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
docs: unify ENV and settings.json configuration documentation (#113)
- Add settings.json column to environment variables table with key name mappings - Document missing ENV variables: TELEGRAM_BOT_TOKEN, TELEGRAM_NOTIFICATION, HAPI_RELAY_FORCE_TCP, VAPID_SUBJECT - Add settings.json example with configuration priority explanation - Create JSON Schema file for settings.json validation and editor autocompletion with all fields, descriptions, and ENV variable references clsoe #113
This commit is contained in:
+35
-12
@@ -166,18 +166,41 @@ On first run, HAPI:
|
||||
<details>
|
||||
<summary>Environment variables</summary>
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `CLI_API_TOKEN` | Auto-generated | Shared secret for authentication |
|
||||
| `HAPI_API_URL` | `http://localhost:3006` | Hub URL for CLI |
|
||||
| `HAPI_LISTEN_HOST` | `127.0.0.1` | HTTP service bind address |
|
||||
| `HAPI_LISTEN_PORT` | `3006` | HTTP service port |
|
||||
| `HAPI_PUBLIC_URL` | - | Public URL for external access |
|
||||
| `HAPI_HOME` | `~/.hapi` | Config directory path |
|
||||
| `DB_PATH` | `~/.hapi/hapi.db` | Database file path |
|
||||
| `CORS_ORIGINS` | - | Allowed CORS origins |
|
||||
| `ELEVENLABS_API_KEY` | - | ElevenLabs API key for voice |
|
||||
| `ELEVENLABS_AGENT_ID` | Auto-created | Custom ElevenLabs agent ID |
|
||||
| Variable | Default | settings.json | Description |
|
||||
|----------|---------|---------------|-------------|
|
||||
| `CLI_API_TOKEN` | Auto-generated | `cliApiToken` | Shared secret for authentication |
|
||||
| `HAPI_API_URL` | `http://localhost:3006` | `apiUrl` | Hub URL for CLI connections |
|
||||
| `HAPI_LISTEN_HOST` | `127.0.0.1` | `listenHost` | Hub HTTP bind address |
|
||||
| `HAPI_LISTEN_PORT` | `3006` | `listenPort` | Hub HTTP port |
|
||||
| `HAPI_PUBLIC_URL` | - | `publicUrl` | Public URL for external access |
|
||||
| `CORS_ORIGINS` | - | `corsOrigins` | Allowed CORS origins (comma-separated) |
|
||||
| `TELEGRAM_BOT_TOKEN` | - | `telegramBotToken` | Telegram Bot API token |
|
||||
| `TELEGRAM_NOTIFICATION` | `true` | `telegramNotification` | Enable Telegram notifications |
|
||||
| `HAPI_RELAY_FORCE_TCP` | `false` | - | Force TCP mode for relay |
|
||||
| `VAPID_SUBJECT` | `mailto:admin@hapi.run` | - | Web Push contact info |
|
||||
| `HAPI_HOME` | `~/.hapi` | - | Config directory path |
|
||||
| `DB_PATH` | `~/.hapi/hapi.db` | - | Database file path |
|
||||
| `ELEVENLABS_API_KEY` | - | - | ElevenLabs API key for voice |
|
||||
| `ELEVENLABS_AGENT_ID` | Auto-created | - | Custom ElevenLabs agent ID |
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>settings.json example</summary>
|
||||
|
||||
Configuration priority: **ENV > settings.json > default**
|
||||
|
||||
When ENV values are set and not present in settings.json, they are automatically saved.
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://hapi.run/schemas/settings.schema.json",
|
||||
"listenHost": "0.0.0.0",
|
||||
"listenPort": 3006,
|
||||
"publicUrl": "https://your-domain.com"
|
||||
}
|
||||
```
|
||||
|
||||
JSON Schema: [settings.schema.json](https://hapi.run/schemas/settings.schema.json)
|
||||
</details>
|
||||
|
||||
## CLI setup
|
||||
|
||||
Reference in New Issue
Block a user