The Twilio CLI uses a "multi-command" architecture similar to git. Commands are organized into topics to represent API resources, while the commands themselves represent actions performed on those resources.
- Single commands: e.g.,
twilio help. - Topic + Command: e.g.,
twilio profile:add or twilio incoming-phone-number:list. - Nesting: Topics and commands can be separated by a colon (
:) or a space. Deeply nested resources follow the pattern twilio <topic>:<sub-topic>:<action>.
Example Mapping:
If the resource is api:messaging:v1:services, the available actions (commands) would be create, fetch, list, update, and delete. The full command would look like:
twilio api:messaging:v1:services:create.
# Example of a nested command structure
twilio api:messaging:v1:services:create