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