Install the Twilio CLI
The Twilio CLI is supported on macOS, Windows, Linux, and even as a Docker image. Follow the directions for your respective operating system to install the CLI and enhance your developer experience with Twilio.
For information on the latest releases of the CLI, refer to the releases list on GitHub.
Currently, Node.js 14+ is supported. Please upgrade if you are using an older version.
We strongly discourage installing the Twilio CLI using a combination of methods. For example, installing the CLI using both Homebrew and npm can cause conflicts in your PATH that may result in unexpected behavior from commands and/or difficulty updating.
Homebrew
The suggested way to install the Twilio CLI on macOS is to use Homebrew. If you don't already have it installed, visit the Homebrew site for installation instructions and then return here.
Once you have installed Homebrew, run the following command to install the CLI:
brew tap twilio/brew && brew install twilio
Scoop
The suggested way to install the Twilio CLI on Windows is by using Scoop. If you don't already have it installed, visit the Scoop site for installation instructions and then return here.
Once you have verified your Scoop installation, do the following:
- Add the
twilio-cli
Bucket:
scoop bucket add twilio-scoop https://github.com/twilio/scoop-twilio-cli
- Install the app:
scoop install twilio
PowerShell will need to be run as an administrator to avoid possible permission issues when installing via Scoop
To install with apt, run the following commands in your terminal:
wget -qO- https://twilio-cli-prod.s3.amazonaws.com/twilio_pub.asc \
| sudo apt-key add -
sudo touch /etc/apt/sources.list.d/twilio.list
echo 'deb https://twilio-cli-prod.s3.amazonaws.com/apt/ /' \
| sudo tee /etc/apt/sources.list.d/twilio.list
sudo apt update
sudo apt install -y twilio
deb file
As an alternative, you may also install the Twilio CLI using apt and a local .deb file:
- In your browser, download the latest .deb file.
- Install the downloaded package using apt:
apt install /path/to/file.deb
rpm file
The Twilio CLI can also be installed using package managers for Red Hat-based Linux distributions, primarily yum and dnf:
- In your browser, download the latest RPM package.
- Install the downloaded package using the package manager of your choice, for example:
yum install /path/to/package.rpm # or dnf install /path/to/package.rpm
macOS
Another way to install the Twilio CLI is by using the standard macOS user interface and your browser:
- In your browser, download the latest macOS installation file.
- Run the downloaded file and follow the on-screen instructions.
If macOS prevents the installation of the .pkg file, follow these steps to successfully open the file and install.
Windows
Another way to install the Twilio CLI is by using the standard Windows user interface and your browser:
- In your browser, download the latest Windows installation file.
- Run the downloaded file and follow the on-screen instructions.
It’s strongly recommended to use one of the other installation methods if possible.
This installation method does not auto-update, and it uses your system’s version of Node.js, which may be older than the version Twilio develops the CLI against.
The Twilio CLI is also installable via npm. This is a manual install method that can be used in environments where auto-updating is not ideal, or where we do not offer a prebuilt binary, and requires that Node.js and npm be installed already on your machine. (npm is installed along with Node.js)
To globally install the CLI so that it can be used from any directory, use:
npm install -g twilio-cli
Verify your installation
To verify your Twilio CLI installation, open a command prompt window and use:
twilio version
The output will be similar to the following:
twilio-cli/5.0.0 darwin-x64 node-v14.19.0
You should see twilio-cli/x.y.z
in the output where x.y.z
is a version number, such as 5.0.0
. If you don’t, but you have installed the CLI, you may need to restart the command prompt window.
You may also use the following, which are equivalent to twilio version
:
twilio --version
twilio -v
Next steps
Now that you've installed the Twilio CLI, you should set up autocomplete, then log in with your Twilio account and create a CLI Profile.
Once you're logged in, you're ready to learn more about how to use the Twilio CLI, and you can begin exploring CLI commands!
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.