Menu

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:

  1. In your browser, download the latest macOS installation file.
  2. 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:

  1. Add the twilio-cli Bucket:
    scoop bucket add twilio-scoop https://github.com/twilio/scoop-twilio-cli
  2. Install the app:
    scoop install twilio

If you installed using Scoop:

  1. Check for available updates using:
    scoop status​
  2. 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:

  1. In your browser, download the latest Windows installation file.
  2. 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.

Linux

apt

twilio-cli can be installed using the Advanced Package Tool (apt) on most distributions such as Debian, Ubuntu, Linux Mint, and more.

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:

  1. In your browser, download the latest .deb file.
  2. 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:

  1. In your browser, download the latest RPM package.
  2. 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

npm

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!

Rate this page:

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.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more