← Twilio Developer KitCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Twilio Developer Kit
Snapshot Sep 30, 2026 · 22:50 UTC · version 0.2.2
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "twilio-cli-reference",
"description": "Twilio CLI reference for managing Twilio resources from the terminal. Covers installation, credential profiles, phone number provisioning, sending SMS and email, webhook configuration, local development with a tunneling service, debugging with watch and logs, serverless deployment, and plugin ecosystem. Use when the developer asks to \"just do it\", \"set this up\", \"run a command\", mentions \"CLI\", \"command line\", or \"terminal\", or when an AI agent can execute a task directly instead of writing application code.",
"included_files": [
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 221
}
],
"skill_md_contents": "---\nname: twilio-cli-reference\ndescription: >\n Twilio CLI reference for managing Twilio resources from the terminal.\n Covers installation, credential profiles, phone number provisioning,\n sending SMS and email, webhook configuration, local development with\n a tunneling service, debugging with watch and logs, serverless deployment, and\n plugin ecosystem. Use when the developer asks to \"just do it\",\n \"set this up\", \"run a command\", mentions \"CLI\", \"command line\", or\n \"terminal\", or when an AI agent can execute a task directly instead\n of writing application code.\n---\n\n## Overview\n\nThe Twilio CLI lets you manage Twilio resources, send messages, configure webhooks, and deploy serverless functions directly from the terminal. AI coding agents can use CLI commands to provision resources and test integrations without writing application code.\n\n**Install:**\n\n| Platform | Command |\n|----------|---------|\n| macOS | `brew tap twilio/brew && brew install twilio` |\n| Windows | `scoop bucket add twilio-scoop https://github.com/twilio/scoop-twilio-cli && scoop install twilio-cli` |\n| Linux (apt) | See `twilio-cli/getting-started/install` for repo setup, then `apt install twilio` |\n| npm | `npm install -g twilio-cli` |\n\n**Update:** `brew upgrade twilio` / `scoop update twilio-cli` / `npm install -g twilio-cli@latest`\n\n---\n\n## Authentication & Profiles\n\n```bash\n# First-time login — creates a local API key stored as a profile\ntwilio login\n\n# Named profiles for multiple accounts\ntwilio profiles:create --account-sid ACxxx --auth-token xxx --profile staging\n# Avoid --auth-token as a plain argument — it will be stored in shell history. Use TWILIO_AUTH_TOKEN env var instead.\ntwilio profiles:list\ntwilio profiles:use staging\n\n# Run a single command against a different profile\ntwilio api:core:messages:list -p production\n\n# Subaccount access\ntwilio api:core:messages:list --account-sid ACxxx_SUBACCOUNT\n```\n\n**Credential priority:** explicit `-p`/`--account-sid` flag > env vars (`TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`) > active profile.\n\n---\n\n## Phone Numbers\n\n```bash\n# Search available numbers (US local, area code 415)\ntwilio api:core:available-phone-numbers:local:list --country-code US --area-code 415\n\n# Purchase a number\ntwilio api:core:incoming-phone-numbers:create --phone-number \"+14155551234\"\n\n# List owned numbers\ntwilio phone-numbers:list\n\n# Set webhooks on a number\ntwilio phone-numbers:update +14155551234 \\\n --sms-url \"https://example.com/sms\" \\\n --voice-url \"https://example.com/voice\"\n```\n\n---\n\n## Send SMS\n\n```bash\ntwilio api:core:messages:create \\\n --from \"+14155551234\" \\\n --to \"+14155556789\" \\\n --body \"Your order has shipped.\"\n\n# List recent messages\ntwilio api:core:messages:list --to \"+14155556789\" --limit 10\n```\n\n---\n\n## Send Email (SendGrid)\n\nRequires `SENDGRID_API_KEY` environment variable.\n\n```bash\n# Configure defaults\ntwilio email:set --from \"noreply@example.com\" --subject \"Default Subject\"\n\n# Send email\ntwilio email:send \\\n --to \"user@example.com\" \\\n --subject \"Invoice attached\" \\\n --text \"Please find your invoice.\" \\\n --attachment ./invoice.pdf\n\n# Pipe output as email body\nps aux | twilio email:send --to \"ops@example.com\" --subject \"Process list\"\n```\n\n---\n\n## Webhook Development\n\n```bash\n# Set webhook URLs on a number\ntwilio phone-numbers:update +14155551234 --sms-url \"https://your-tunnel-url.example.com/sms\"\n\n# Emulate webhook events locally (requires plugin)\ntwilio plugins:install @twilio-labs/plugin-webhook\ntwilio webhook:invoke http://localhost:3000/sms --type sms\n```\n\n**Local development:** The CLI rejects `localhost` URLs directly. Tunneling services such as ngrok are not bundled with twilio-cli. install one separately, then set the public tunnel URL as your webhook. \n\n** ngrok is NOT included in the CLI — install separately: npm install -g ngrok\n or via https://ngrok.com \n - Start tunnel: ngrok http 3000, then use the provided URL for webhook \n configuration \n---\n\n## Debugging & Monitoring\n\n```bash\n# Debug logging on any command (logs to stderr)\ntwilio api:core:messages:create --from +14155551234 --to +14155556789 --body \"test\" -l debug\n\n# Real-time monitoring (requires plugin)\ntwilio plugins:install @twilio-labs/plugin-watch\ntwilio watch # stream debugger alerts, calls, messages in real time\n\n# Output formatting\ntwilio api:core:messages:list -o json # JSON output\ntwilio api:core:messages:list -o tsv # tab-separated\ntwilio api:core:messages:list --properties sid,status,direction # select columns\ntwilio api:core:messages:list --limit 200 # override default 50-record cap\n```\n\n---\n\n## Serverless Deployment\n\n```bash\ntwilio plugins:install @twilio-labs/plugin-serverless\n\n# Create a new Functions project\ntwilio serverless:init my-project --template blank\ncd my-project\n\n# Local development\ntwilio serverless:start # serves functions at localhost:3000\n\n# Deploy to Twilio\ntwilio serverless:deploy\n```\n\n---\n\n## Plugins\n\n```bash\ntwilio plugins:install <package>\ntwilio plugins:list\ntwilio plugins:remove <package>\n```\n\n| Plugin | What it does |\n|--------|-------------|\n| `@twilio-labs/plugin-serverless` | Develop and deploy Twilio Functions and Assets |\n| `@twilio-labs/plugin-dev-phone` | Test SMS/Voice without a real phone |\n| `@twilio-labs/plugin-watch` | Real-time monitoring of debugger alerts, calls, messages |\n| `@twilio-labs/plugin-token` | Generate client-side SDK tokens (Voice, Chat, Video) |\n| `@twilio-labs/plugin-assets` | Upload static resources |\n| `@twilio-labs/plugin-webhook` | Emulate webhook events for local testing |\n| `@twilio-labs/plugin-flex` | Create, build, deploy Flex plugins |\n\n---\n\n## Regional & Edge Routing\n\n```bash\n# Login to a specific region\ntwilio login --region au1 --edge sydney\n\n# Set edge globally\ntwilio config:set --edge=sydney\n\n# Or via env vars\nexport TWILIO_REGION=au1\nexport TWILIO_EDGE=sydney\n```\n\nSupported: `au1`/`sydney`, `ie1`/`dublin`, `jp1`/`tokyo`. Each region uses a different Auth Token from your US1 credentials. Find yours in the Twilio Console under API keys & tokens, selecting your target region.\n\n---\n\n## Configuration\n\n```bash\ntwilio config:list # show all settings\ntwilio config:set --edge=sydney # set default edge\ntwilio config:set --require-profile-input # prompt before using active profile\n```\n\nConfig stored at `~/.twilio-cli/config.json`.\n\n**Syntax notes:**\n- Commands use spaces by default, using colon also works: `twilio api core messages create` = `twilio api:core:messages:create`\n- `twilio [COMMAND] --help` for any command's options\n- Multi-line: use `\\` for line continuation\n\n---\n\n## CANNOT\n\n- **Default list limit is 50 records** — always pass `--limit` for larger result sets.\n- **API timeout is 30 seconds** — long-running operations may fail silently.\n- **Cannot use localhost URLs for webhooks** — use a tunneling service, such as ngrok, installed separately.\n- **No autocomplete on Windows** — only bash/zsh supported.\n- ** ngrok is not bundled with twilio-cli**, install separately\n- **Cannot send Twilio Email (comms API) via CLI** — `twilio email:send` uses SendGrid only. For Twilio Email, use the REST API directly.\n\n---\n\n## Next Steps\n\n- **Account setup and API keys:** `twilio-account-setup`, `twilio-iam-auth-setup`\n- **Webhook architecture and signature validation:** `twilio-webhook-architecture`\n- **Debugging and observability:** `twilio-debugging-observability`\n- **Send SMS via API/SDK:** `twilio-send-message`\n- **SendGrid email setup:** `twilio-sendgrid-account-setup`\n"
}SHA-256: dabe0ec8baa9c21ab135e6ff553c4143148dc5a44f7a111498ce81d57da73f2f