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

Open up your Terminal application and type the following commands to automatically install Acquia CLI. Remember to press Enter on your keyboard to execute each command.

  1. Download the latest version of Acquia CLI.

    curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar
    
  2. Make the file executable.

    chmod +x acli.phar
    
  3. Rename the file and move it to a location that is globally accessible.

    This step allows you to type acli from anywhere on your system.

    Note

    The following command may require the use of sudo on some systems. If it fails for you, prefix the command with sudo. When prompted for a password, specify your password.

    mv acli.phar /usr/local/bin/acli
    

Run acli from anywhere on your system to view the installed version of Acquia CLI and a list of commands.

Note

Acquia CLI doesn’t require the Windows Subsystem for Linux (WSL). It runs natively in any environment that has the necessary version of PHP and extensions.

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

Open a command-line interface and run php acli.phar. You can view 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 can’t run acli. Ensure to install or 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.