---
title: "Getting started with Acquia CLI"
date: "2024-02-14T06:18:38+00:00"
summary: "Streamline your Acquia Cloud Platform workflow with Acquia CLI. Learn how to authenticate, set up SSH access, and start using powerful command-line tools for efficient development and management."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/acquia-cli/getting-started-acquia-cli"
id: "12b073cd-755d-4bf8-b699-516270c29513"
---

Table of contents will be added

This document provides the steps to perform the following:

*   Link your installation of Acquia CLI to the [Cloud Platform API](/acquia-cloud-platform/develop-apps/api)
*   Set up SSH access to your [Cloud Platform](/acquia-cloud-platform) environment

Note

To troubleshoot most of the error messages related to Acquia CLI, run the commands again using the `--verbose` option to diagnose issues.

Authenticating with Cloud Platform API
--------------------------------------

To begin using [Acquia CLI](https://github.com/acquia/cli), authenticate against your [Cloud Platform](/acquia-cloud-platform) account. Open your Terminal and type:

    acli auth:login

This command prompts you to open the page from which you can create a [Cloud Platform API token](/acquia-cloud-platform/develop-apps/api/auth#cloud-generate-api-token) in the [Cloud Platform user interface](https://cloud.acquia.com/a/profile/tokens).

Note

If you use other Acquia products, such as [Pipelines CLI](/acquia-cloud-platform/features/pipelines/cli), your machine might already be authenticated with the [Cloud Platform](/acquia-cloud-platform), and you can reuse an existing token.

For example:

    $ acli auth:login
    You will need a Cloud Platform API token from
    https://cloud.acquia.com/a/profile/tokens
    Do you want to open this page to generate a token now? y
    Please enter your API Key: <ENTER API KEY HERE>
    Please enter your API Secret: <ENTER API SECRET HERE>
    Saved credentials to /home/<user>/.acquia/cloud_api.conf

You can also authenticate in a non-interactive manner through Terminal by providing your tokens as parameters or environment variables. For more information about providing your tokens as parameters, run the following command:

    acli auth:login --help

In priority order, Acquia CLI accepts the following:

1.  An access token stored in the `ACLI_ACCESS_TOKEN` environment variable with its corresponding `ACLI_ACCESS_TOKEN_EXPIRY` value
2.  An `ACLI_KEY` environment variable and its corresponding `ACLI_SECRET`
3.  Values defined in `~/.acquia/cloud_api.conf` as generated by the `acli auth:login` command

Setting up SSH access to Cloud Platform environments
----------------------------------------------------

To interact with [Cloud Platform](/acquia-cloud-platform), you must generate and upload an SSH key. This allows you to access your [Cloud Platform](/acquia-cloud-platform) environments using SSH.

Run the following command:

    acli ssh-key:create-upload

Next steps
----------

For more information on Acquia CLI, see [Acquia CLI commands](/acquia-cloud-platform/add-ons/acquia-cli/commands).