@spekoai/cli
Build and operate voice agents from the terminal, including from a coding agent.
speko-cli covers the Speko API from a shell: sign in, create agents, place calls,
read transcripts, and prove a prompt change did not break anything. It exists so a
coding agent can build on Speko without a person clicking through the console.
Install
npm install -g @spekoai/cli
speko-cli loginOr without installing:
npx @spekoai/cli loginThe command is speko-cli, not speko — @spekoai/mcp-calls already uses that name.
Teach a coding agent about it
speko-cli initWrites .claude/skills/speko/SKILL.md, a marked block in AGENTS.md, and
.env.example. It never writes a credential into the project, and never
overwrites an existing file without --force.
Every command also takes --help, and asking never performs the action — so an
agent can explore the surface without side effects.
Commands
| Command | What it does |
|---|---|
login / logout / whoami | Sign this device in, out, and check who it is |
auth list / auth revoke | See and revoke every signed-in terminal |
init | Write Speko guidance for coding agents into the repo |
call --to <e164> | Place a call, wait for it, print the transcript |
logs <session_id> | Call events, --follow to stream |
doctor | Why calls are failing: credit, providers, scopes, last failure |
explain <CODE> | What an error code means, and whether retrying helps |
bench [stage] | Measured provider scores — the numbers routing decides on |
eval | Generate a test suite for an agent, run it, report regressions |
mcp | Point an MCP client at Speko |
Plus every operation in the OpenAPI document, generated rather than hand-written:
speko-cli agents # list a group's operations
speko-cli agents list # every agent in the workspace
speko-cli agents get <agent_id>
speko-cli agents create --data '{"name":"Front desk"}'Groups come from the spec's tags: agents, call-control, providers, sms,
telephony, voice, webhooks. The canonical name is the operationId,
kebab-cased (listAgents → list-agents); list, get, create, update
and delete are aliases where a group makes them unambiguous.
Path parameters are positional in URL order, query parameters are --flags, and
a request body comes from --data JSON, --file PATH, or stdin. Add --json to
any command for machine-readable output.
The development loop
speko-cli call --to +15551234567 --agent <agent_id> # place it, wait, print the transcript
speko-cli logs <session_id> --follow # events as they arrive
speko-cli eval run --agent <agent_id> # prove the change is safecall prints the session id before it starts waiting, so the id survives a
timeout or a Ctrl-C. --no-wait returns immediately. A call that ends failed
exits 1, so a script placing calls in a loop can notice.
The transcript is the only way to verify a prompt change altered behaviour — a diff cannot show that an agent stopped confirming before it booked.
What the CLI will not do
Some acts belong to a person, so the CLI prints the console URL instead of doing them:
| Operation | Why |
|---|---|
telephony submit-phone-number-kyb | Asserts you are authorized to bind the business |
telephony create-phone-number | Spends money and starts a recurring charge |
telephony delete-phone-number | Returns the number to the carrier permanently |
There is no command for API keys at all. A key is a long-lived organization credential destined for production, so it is issued in the console by a person.
agents delete-agent and sms redact-sms-conversation are destructive and
deliberately stay: the first is how anyone iterating discards a test agent, and
the second is plausibly how a data-deletion request gets serviced, which wants to
be scriptable rather than clicked.
Environment
| Variable | Default |
|---|---|
SPEKO_API_URL | https://api.speko.dev |
SPEKO_DASHBOARD_URL | https://platform.speko.ai |
XDG_CONFIG_HOME | ~/.config |
Source: github.com/SpekoAI/cli