SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Split a Twilio CLI Command into Multiple Lines

Twilio CLI commands may require multiple parameters. In these situations, it can be helpful to break up a command across multiple lines - especially when sharing commands with someone else, or giving an example. This guide explains how to split your commands, and gives sample code for different environments.

Notice: CLI command examples may need to swap line continuation characters between \ and ` depending on your shell.

PowerShell (Windows)

For PowerShell users, line continuation is done by ending the line with a space and the backtick character, `.

Example

twilio api:core:messages:create `
  --from "+XXXXXXXXX" `
  --to "+XXXXXXXXX" `
  --body "I love Twilio"

Zsh / Bash (MacOS and Linux)

For MacOS and Linux terminal users, line continuation is done by ending the line with a space and the backslash character, \.

Example

twilio api:core:messages:create \
  --from "+XXXXXXXXX" \
  --to "+XXXXXXXXX" \
  --body "I love Twilio"
Have more questions? Submit a request
Powered by Zendesk