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

FlagDescription
--template basicBasic template (default)
--template advancedAdvanced template with function calling
--api-key KEYPre-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:

  1. Authenticates with your HostDesk API key
  2. Opens a WebSocket connection to the HostDesk server
  3. Forwards incoming webhook events to http://localhost:5000/webhook
  4. Displays events in the terminal in real-time

Options

FlagDescription
--port PORTLocal port to forward to (default: 5000)
--path PATHWebhook path on your local server (default: /webhook)
--api-key KEYAPI 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:

  1. Fetches config from the HostDesk API using your API key
  2. Polls for incoming jobs (calls assigned to your account)
  3. Joins LiveKit rooms with server-issued tokens
  4. Runs the STT/LLM/TTS pipeline for each call

Options

FlagDescription
--api-key KEYAPI key (or set ECHOAI_API_KEY env var)
--api-url URLAPI base URL (default: http://0.0.0.0:8000)

Environment variables

The CLI reads these environment variables:

VariableDescription
ECHOAI_API_KEYYour HostDesk API key
ECHOAI_API_URLAPI base URL
ECHOAI_WEBHOOK_SECRETWebhook signing secret