Twilio CLI
$ twilio Official High RiskTwilio CLI exposes Twilio's Programmable Messaging, Voice, Lookup, Debugger, and Serverless APIs through an oclif command tree. Built-in -o json formatting and --properties filtering make it predictable for agents, though messaging and voice calls incur real per-unit billing.
brew install twilio/brew/twilio Twilio CLI covers the full OpenAPI-generated twilio api:* surface plus local webhook debugging and Serverless deploys in one predictable binary.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -o json and --properties field selection across API commands generated directly from Twilio's OpenAPI specs.
-o json/--propertiesavailable acrosstwilio api:*commands- oclif self-describing help tree
Supports named profiles and TWILIO_ACCOUNT_SID scoping, but live accounts have direct telecom billing side effects.
- Named profiles via
twilio profiles:useseparate test vs prod accounts - Sending messages or provisioning numbers triggers immediate billing
Installable via npm or official Homebrew tap on macOS, Linux, and Windows.
npm install -g twilio-cliandbrew install twilio/brew/twilio
Exposes the entire Twilio REST surface plus Serverless deployment and debugger inspection.
- Auto-generated
twilio api:*subcommands stay current with REST endpoints
Official Twilio repository (twilio/twilio-cli) maintained under MIT.
- Official Twilio GitHub organization
Official Twilio CLI docs cover installation, plugins, and general usage flags.
- Official docs at twilio.com/docs/twilio-cli
Security, Auth & Guardrails
Stores encrypted credentials via OS keychain (or config fallback) under ~/.twilio-cli/config.json, and supports TWILIO_ACCOUNT_SID / TWILIO_AUTH_TOKEN / TWILIO_API_KEY.
CLI is free (MIT); live SMS, voice calls, and phone numbers incur per-usage Twilio billing.
# Twilio CLI Agent Rules - Use Test Credentials or sandbox profiles; NEVER send live SMS (`messages:create`) or voice calls (`calls:create`) without explicit human approval. - Always pass `-o json` and `--properties` on list commands to avoid noisy table output. - Restrict outbound webhooks and phone number purchases to human-approved steps.
Agent-Ready Command Recipes
Safe Read-Only Queries
twilio debugger:logs:list --limit 10 -o json
Fetches recent Twilio account alerts and webhook failure logs in structured JSON.
twilio api:core:incoming-phone-numbers:list --limit 5 --properties sid,phoneNumber,friendlyName -o json
Queries provisioned numbers while restricting output fields via --properties.
Controlled Writes & Previews
twilio serverless:deploy --environment dev -o json
Deploys local Twilio Serverless functions to a non-production dev environment.
Strengths for Agents
- +
-o jsoncombined with--propertieskeeps token usage low when agents inspect resources. - + Comprehensive
twilio api:*tree generated from OpenAPI specs eliminates hand-written curl calls. - + Named profiles and environment variables make test-credential isolation straightforward.
Caveats & Pitfalls
- ! Lacks a global
--dry-runflag onapi:*write commands. - ! Accidental calls to
messages:createorincoming-phone-numbers:createon live profiles incur real charges.