Install the Confluent Cloud CLI

You can use the Confluent Cloud CLI to manage your Kafka topics in Confluent Cloud.

Prerequisites
  • The Confluent Cloud CLI is supported for macOS, Linux, and Unix-based operating systems.
  • curl must be installed.

Important

If you have a version of the Confluent Cloud CLI prior to 0.78.x installed, you must uninstall this older version before upgrading. You can check the version of the Confluent Cloud CLI with the ccloud version command. For more information, see Compatibility with Earlier Confluent Cloud CLI Versions.

  1. Run this command to install the Confluent Cloud CLI. This command creates a bin directory in your designated location (<path-to-directory>/bin). The location must be in your PATH (e.g. /usr/local/bin).

    curl -L https://cnfl.io/ccloud-cli | sh -s -- -b /<path-to-directory>/bin
    
  2. Optional: Verify installation by typing ccloud in your terminal.

    ccloud
    

    You should see Confluent Cloud CLI usage information:

    Welcome to the Confluent Cloud CLI
    
    Usage:
      ccloud [command]
    
    Available Commands:
      api-key         Manage API keys
      completion      Output shell completion code
      environment     Manage and select ccloud environments
      help            Help about any command
      kafka           Manage Kafka
      login           Login to Confluent Cloud
      logout          Logout of Confluent Cloud
      service-account Manage service accounts
      update          Update ccloud
      version         Print the ccloud version
    
    Flags:
      -h, --help            help for ccloud
      -v, --verbose count   increase output verbosity
          --version         version for ccloud
    
  3. Log in to your cluster using the ccloud login command with the cluster URL specified.

    ccloud login --url https://confluent.cloud
    
    Enter your Confluent Cloud credentials:
    Email: susan@myemail.com
    Password:
    
  4. Connect Confluent Cloud CLI to a Cluster.

Uninstall the Confluent Cloud CLI

Run these commands to uninstall the Confluent Cloud CLI. These commands assume you have installed the CLI in the /usr/local/bin folder.

rm -rf ~/.ccloud/

sudo rm /usr/local/bin/ccloud

Uninstall CLI Versions Prior to 0.78.x

If you have a version of the Confluent Cloud CLI prior to 0.78.x installed, you must uninstall this older version before installing the latest. You can check the version of the Confluent Cloud CLI with the ccloud version command.

Tip

Confluent Cloud CLI versions prior to 0.78.x stored their configuration in .ccloud/config. This file is no longer used and can be deleted. For more information, see Login and Configuration.

MacOS

Run this command from your terminal:

brew uninstall ccloud

Linux

  1. Delete the Confluent Cloud CLI files and folder from your system. For example:

    rm -rf <path-to-ccloud-cli>/ccloud-0.2.1
    
  2. Remove the entry from your PATH environment variable.

Windows

  1. Delete the Confluent Cloud CLI files and folder from your system. For example:

    rm -rf <path-to-ccloud-cli>/ccloud-0.2.1
    
  2. Remove the entry from your JAVA_HOME environment variable.