# Twilio CLI
> Manage Twilio resources from the terminal

## Summary
Manage Twilio resources from the terminal. Send test SMS and voice calls, manage phone numbers, explore API endpoints, and deploy Twilio Serverless Functions.

## Capabilities
- Send test SMS messages and make voice calls
- Manage phone numbers, messaging services, and accounts
- Explore and interact with any Twilio API endpoint
- Deploy Twilio Serverless Functions and Assets
- Debug webhooks and API interactions
- Manage multiple Twilio account profiles

## When to Use
- Testing Twilio SMS, voice, or other communication APIs
- Managing Twilio phone numbers and messaging services
- Deploying Twilio Serverless Functions
- Debugging Twilio webhook integrations

## When NOT to Use
- Building production messaging pipelines (use the Twilio SDK directly)
- Not using Twilio for communications
- Need a GUI for account management (use the Twilio Console)

## Key Flags
- `api:core:messages:create`: Send an SMS message via the Twilio API
- `phone-numbers:list`: List all phone numbers in the account
- `profiles:use`: Switch between Twilio account profiles
- `serverless:deploy`: Deploy Twilio Serverless Functions and Assets
- `debugger:logs:list`: List recent error and warning logs

## Usage Patterns
### Send a test SMS
```
twilio api:core:messages:create --from +15551234567 --to +15559876543 --body 'Hello from the CLI'
```
Sends an SMS message between two phone numbers on the account

### List phone numbers
```
twilio phone-numbers:list
```
Lists all phone numbers associated with the Twilio account

### Deploy serverless functions
```
twilio serverless:deploy
```
Deploys Functions and Assets from the current project directory

## Input / Output
- **stdin**: Not typically used
- **stdout**: API responses, resource listings, and deployment status

## Installation
- **homebrew**: `brew tap twilio/brew && brew install twilio`
- **npm**: `npm i -g twilio-cli`

## Related Tools
- [stripe-cli](/tools/stripe-cli) (complementary): Stripe CLI for payments, Twilio CLI for communications — both are SaaS API CLIs
- [httpie](/tools/httpie) (complementary): HTTPie for general API testing; Twilio CLI has built-in Twilio auth

---
Source: https://littlescripts.sh/tools/twilio-cli
