Information for: DEVELOPERS   PARTNERS

Installing Acquia CLI

Use the information on this page to install Acquia CLI in your development environment.

Note

Acquia CLI is distributed only as a self-contained Phar archive. It should not be installed through Composer, as this can create dependency conflicts.

Requirements

Acquia CLI requires PHP 7.3 or later with the PHP-JSON and PHP-PHAR extensions enabled. Acquia CLI will warn you if these requirements are not met.

Some commands require a Cloud Platform account. Acquia CLI will prompt you to link your Cloud Platform account when running commands that require it (see Authenticating with Acquia Cloud Platform API).

Installation Procedure

Download the latest acli.phar file from the releases page, make it executable, rename it to acli, and place it somewhere globally accessible on your machine.

The following commands will perform these steps automatically (may require sudo on some systems):

curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar
chmod +x acli.phar
mv acli.phar /usr/local/bin/acli

Running acli should then show the installed version of Acquia CLI and a list of commands.

Download the latest acli.phar file from the releases page and place it in the directory where you want to run Acquia CLI.

Running php acli.phar should then show the installed version of Acquia CLI and a list of commands. If you run into a SSL certificate issue, review this known issue.

In CMD and Powershell, Phar files (including Acquia CLI) must be run using the PHP CLI interpreter in the directory where the Phar is installed. To instead run Acquia CLI as an executable from another directory, create a batch script such as the following:

@ECHO OFF
php %~dp0acli.phar %*

Note

On certain systems or PHP builds where the php-phar extension is not installed, you will not be able to run acli. Make sure to install/ compile with the extension if PHP returns Class 'Phar' not found.

Now that you’ve installed Acquia CLI, proceed to Getting started with Acquia CLI.