CLI Commands
The HostDesk CLI (echoai) helps you scaffold projects, run workers, and listen for incoming calls from the terminal.
Installation
pip install echoai-sdk
This installs the echoai command-line tool.
echoai init
Scaffold a new HostDesk project with boilerplate files:
echoai init my-voice-app
This creates:
my-voice-app/
├── .env.example
├── main.py # Worker entry point
├── requirements.txt
└── tools.py # Function handler example
Options
| Flag | Description |
|---|---|
--template basic | Basic template (default) |
--template advanced | Advanced template with function calling |
--api-key KEY | Pre-fill the API key in .env |
Example:
echoai init my-app --template advanced --api-key ek_live_abc123
echoai listen
Start a local webhook listener that forwards HostDesk events to your development server. Similar to stripe listen or ngrok.
echoai listen --port 5000
This:
- Authenticates with your HostDesk API key
- Opens a WebSocket connection to the HostDesk server
- Forwards incoming webhook events to
http://localhost:5000/webhook - Displays events in the terminal in real-time
Options
| Flag | Description |
|---|---|
--port PORT | Local port to forward to (default: 5000) |
--path PATH | Webhook path on your local server (default: /webhook) |
--api-key KEY | API key (or set ECHOAI_API_KEY env var) |
Example:
export ECHOAI_API_KEY=ek_live_abc123
echoai listen --port 8080 --path /api/webhook
echoai worker
Run the HostDesk voice worker in token-only mode (no LiveKit API key required on the client):
echoai worker
The worker:
- Fetches config from the HostDesk API using your API key
- Polls for incoming jobs (calls assigned to your account)
- Joins LiveKit rooms with server-issued tokens
- Runs the STT/LLM/TTS pipeline for each call
Options
| Flag | Description |
|---|---|
--api-key KEY | API key (or set ECHOAI_API_KEY env var) |
--api-url URL | API base URL (default: http://0.0.0.0:8000) |
Environment variables
The CLI reads these environment variables:
| Variable | Description |
|---|---|
ECHOAI_API_KEY | Your HostDesk API key |
ECHOAI_API_URL | API base URL |
ECHOAI_WEBHOOK_SECRET | Webhook signing secret |