Install or update to the latest version of twilio-cli
twilio-cli
is supported on macOS, Windows, Linux, and even as a Docker image. Follow the directions for your respective operating system to install twilio-cli
and enhance your developer experience with Twilio.
For information on the latest releases of twilio-cli
, refer to the releases list on GitHub.
We strongly discourage installing twilio-cli
using a combination of methods. For example, installing twilio-cli
using both Homebrew and npm can cause conflicts in your PATH that may result in unexpected behavior from commands and/or difficulty updating.
Contents
MacOS
Homebrew
The suggested way to install 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 twilio-cli
:
brew tap twilio/brew && brew install twilio
If you installed twilio-cli
with brew
and want to upgrade to the latest version, run:
brew upgrade twilio
.pkg file
Another way to install 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 you installed using a .pkg
file, you will need to download and run a new installer each time you wish to update your current installation of twilio-cli
.
To check the latest version and when it was released, see the twilio-cli Release Log on GitHub.
If macOS prevents the installation of the .pkg file, follow these steps to successfully open the file and install.
Windows
scoop
The suggested way to install 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.
PowerShell will need to be run as an administrator to avoid possible permission issues when installing via Scoop
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
If you installed using Scoop:
- Check for available updates using:
scoop status
If available, install the updates using:
scoop update
.exe file
Another way to install 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.
If you installed using an .exe
file, you will need to download and run a new installer each time you wish to update your current installation of twilio-cli
. To see the latest version and when it was released, see the twilio-cli Release Log on GitHub.
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
If you installed twilio-cli
with apt, you can upgrade using:
sudo apt update
sudo apt upgrade twilio
.deb file
As an alternative, you may also install 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
If you installed using a local .deb
file, you will need to download and install the latest file each time you wish to update your current installation of twilio-cli
. To see the latest version and when it was released, see the twilio-cli Release Log on GitHub.
.rpm file
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
If you installed using a downloaded .rpm
file, use:
yum update twilio
# or
dnf update twilio
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 twilio-cli
against.
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 twilio-cli
so that it can be used from any directory, use:
npm install -g twilio-cli
To update your CLI installation with npm, use:
npm install -g twilio-cli@latest
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/3.0.0 darwin-x64 node-v17.4.0
You should see twilio-cli/x.y.z
in the output where x.y.z
is a version number, such as 3.0.1
. If you don’t, but you have installed twilio-cli
, you may need to restart the command prompt window.
Next steps
Now that you've installed twilio-cli
, you should log in with your Twilio account.
Once you're logged in, you're ready to learn more about how to use 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.