Early access: the dashboard, CLI, MCP server and REST API are available. We are happy to help you set them up for your voice stack.

CLI

Installation, login and every command of the command line tool.

Installation

npm install -g @trunkbeam/cli

Or without installing, with npx @trunkbeam/cli <command>. Requires Node.js 22 or newer.

Sign in

In the dashboard, create an API key under API, CLI & MCP. Then:

trunkbeam login

The CLI asks for the key without echoing it, checks it and stores it in ~/.config/trunkbeam/config.json, readable only by your user. trunkbeam logout deletes it again.

On servers and in CI, set the environment variable instead:

export TRUNKBEAM_API_KEY=tb_live_…

Order of precedence: --key before TRUNKBEAM_API_KEY before the stored file.

Global options

OptionEffect
--jsonRaw API data as JSON, for scripts
--yes, -yRun paid actions without asking
--key <key>Use a different API key for this call
--help, -hHelp, also per command: trunkbeam numbers --help

Commands

CommandWhat it does
login, logoutSign the CLI in or out
accountAccount, verification status, plan and the key’s permissions
sitesSites with ID; only verified sites get local numbers
onkz <place or area code>Search an area code, for example onkz Schramberg
numbers lsYour numbers with ID, status and target
numbers order --site <id>Order a local number at the site, shows the price first
numbers order --032Order an 032 number without an area code
numbers connect <id> --elevenlabsConnect a number to ElevenLabs in one step
numbers connect <id> --sip-uri <uri>Route a number to any SIP address
numbers fallback <id> <number>Fallback number if the agent is unreachable
numbers release <id>Cancel a number, asks first
requests ls, requests rm <id>View orders, withdraw open ones
connections ls, connections add, connections rm <id>Manage agent connections (SIP targets)
guide <provider> --number <id>Setup guide with your real values
transfer get, transfer set, transfer resetTransfer to people, as default or per number
hold-musicHold music with descriptions
calls lsRecent calls with duration, status and cost
usage --month <YYYY-MM>Usage and cost for a month
pricesPlans and prices

Providers for guide and connections add --provider: elevenlabs, livekit, livekit_self, vapi, retell, ultravox, openai, deepgram, sip.

In scripts

With --json and --yes, everything runs without prompts. Example: get a number at site 3 for a new customer and route it to their agent.

id=$(trunkbeam numbers order --site 3 --yes --json | jq -r '.assigned.id')
trunkbeam numbers connect "$id" --sip-uri "sip:customer-42@voice.example" --json

If no number is available right away, assigned is null and the order stays open. trunkbeam requests ls shows its status.

Exit codes

CodeMeaning
0Success
1Error or cancelled
2Invalid usage
Connect your stack to TrunkBeam