Twilio CLI is Now Generally Available
Time to read: 3 minutes
We are excited to announce that Twilio Command-line Interface (CLI) is now generally available. Start using Twilio CLI to simplify and optimize your development workflow! The Twilio CLI enables you to build, test, deploy and maintain directly from your terminal, reducing the context switching needed between your IDE, browser tabs, console, and terminal. Additionally, the CLI can be used to automate repetitive tasks, add logs, use commands to simplify interactions with APIs by grouping common tasks together, and much more.
Here’s an overview of some key features of Twilio CLI to get you started.
Commands
All Twilio APIs can be accessed from the terminal with api
as a root command.
Explore and call any API directly from your terminal using:
We have bundled up the most common functionalities together into CLI commands to ensure that the Twilio CLI goes beyond being a wrapper around APIs, and enables you to quickly complete your tasks.
For example, to view a list of available phone numbers in your country and area code, use:
Buy a phone number from your terminal using:
Debug your applications using:
Try out more examples here.
Explore CLI with autocomplete and help
We recommend you enable autocompletion by using the twilio autocomplete
command. Once autocomplete is enabled, you can press the Tab
key to either automatically complete your command or display suggestions.
Using autocomplete is not just great for reducing the time taken to write commands, it's also great for exploring CLI commands.
After tabbing around and discovering commands relevant to you, use the --help
or -h
flag to find more information about arguments and supported flags for these commands.
The above example showcases exploring the Conversations API using Tab
and --help
, CLI commands associated with all the topics can be explored similarly.
Extend CLI functionality using Plugins
Twilio CLI has a built-in plugin framework which can be used to extend the Twilio CLI, and allow your team to complete common operational tasks. You can publish your plugins to share with the community, or make them private for your own or your client's usage. Learn more about how to build your own plugin here.
Install a plugin by using the plugins:install
command and its package name:
Want to try CLI plugins before building your own?
You can also start extending the CLI functionality with existing plugins built by Twilions. Some of our favorite plugins are:
- Twilio Flex: Use the Twilio Flex plugin to develop, build and deploy Flex plugins to customize your contact center.
- Install the Serverless plugin to locally develop, debug, and deploy to Twilio Serverless via the terminal.
- Use the Dev phone plugin to test your Twilio apps when you don’t have reliable, easy access to SMS and calling capabilities.
- Validate your webhook requests with the webhook plugin.
Click here to learn more about CLI plugins.
Control the command output
Customize the command output format, filter the output columns, or limit the values according to your use case.
- Use the
--properties
option to explicitly control which columns to output. - Want to pipe CLI output to tools like jq to parse JSON (JavaScript Object Notation)? Add
-o json
to any command and send the entire API response to stdout as JSON. - Need to modify your output for machine processing tasks? Add
-o tsv
to the command to change the output format to Tab Separated Values (TSV).
Ready to get started with CLI?
Use our quick start guide to become familiar with the Twilio CLI and start building with us.
In case of issues in the GA version, you can raise a ticket to support. If you have feedback or feature requests, please run the twilio feedback
command directly from your CLI and share your feedback.
We're excited to see what you build!
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.