Install Confluent CLI¶
This topic describes how to install the Confluent CLI on macOS, Linux, and Windows. It also includes other installation methods you can use to install the CLI. Before you install, verify you meet all requirements.
macOS and Linux users can install the latest version of Confluent CLI using the following Homebrew command:
brew install confluentinc/tap/cli
If you are a Debian or Ubuntu user, you can install the latest version of Confluent CLI using the APT package manager:
Install
curl
andgpg
(if you have not already installed them).sudo apt install curl gnupg
Install the Confluent CLI APT public key:
sudo mkdir -p /etc/apt/keyrings curl https://packages.confluent.io/confluent-cli/deb/archive.key | sudo gpg --dearmor -o /etc/apt/keyrings/confluent-cli.gpg sudo chmod go+r /etc/apt/keyrings/confluent-cli.gpg
You should see output similar to the following:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3106 100 3106 0 0 16062 0 --:--:-- --:--:-- --:--:-- 16010
Add the Confluent CLI repository to your APT configuration:
echo "deb [signed-by=/etc/apt/keyrings/confluent-cli.gpg] https://packages.confluent.io/confluent-cli/deb stable main" | sudo tee /etc/apt/sources.list.d/confluent-cli.list >/dev/null
Update
apt
:sudo apt update
Install the Confluent CLI:
sudo apt install confluent-cli
You should see output similar to:
... The following NEW packages will be installed: confluent-cli 0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded. Need to get 19.3 MB of archives. After this operation, 56.2 MB of additional disk space will be used. Get:1 https://packages.confluent.io/confluent-cli/deb stable/main amd64 confluent-cli amd64 3.48.0 [19.3 MB] ... Unpacking confluent-cli (3.48.0) ... Setting up confluent-cli (3.48.0) ...
Confluent Platform
If you installed Confluent Platform using APT, you should already have a version of the Confluent CLI. In most cases, Confluent Platform users should use the version of Confluent CLI provided with Confluent Platform. However, you can still install the latest version of the Confluent CLI from the CLI repository by using the following steps:
Install
curl
andgpg
(if you have not already installed them).sudo apt install curl gnupg
Install the Confluent CLI APT public key:
sudo mkdir -p /etc/apt/keyrings curl https://packages.confluent.io/confluent-cli/deb/archive.key | sudo gpg --dearmor -o /etc/apt/keyrings/confluent-cli.gpg sudo chmod go+r /etc/apt/keyrings/confluent-cli.gpg
You should see output similar to the following:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3106 100 3106 0 0 16062 0 --:--:-- --:--:-- --:--:-- 16010
Add the Confluent CLI repository to your APT configuration:
echo "deb [signed-by=/etc/apt/keyrings/confluent-cli.gpg] https://packages.confluent.io/confluent-cli/deb stable main" | sudo tee /etc/apt/sources.list.d/confluent-cli.list >/dev/null
Update
apt
:sudo apt update
Install the latest version of the Confluent CLI. A specific version must be provided; if not, APT will install the CLI provided by Confluent Platform that uses the Confluent Platform version number (which is not considered to be latest CLI version by APT).
sudo apt install confluent-cli=3.48.0
To find the current latest version, you can run the following commands:
sudo apt update
andsudo apt list -a confluent-cli
and look for the highest version number earlier than7.x
or refer to the Confluent CLI Release Notes.
Note
Updating the CLI through APT, or installing Confluent Platform through APT will cause this version of the CLI to be replaced with the version provided by Confluent Platform.
RHEL and CentOS users can install the latest version of Confluent CLI using the YUM package manager.
Install the Confluent CLI YUM public key:
sudo rpm --import https://packages.confluent.io/confluent-cli/rpm/archive.key
Install
yum-config-manager
(included in theyum-utils
package) if it is not already installed:sudo yum install yum-utils
Add the Confluent CLI repository to your YUM configuration:
yum-config-manager --add-repo https://packages.confluent.io/confluent-cli/rpm/confluent-cli.repo
You should see output similar to:
Loaded plugins: fastestmirror, ovl adding repo from: https://packages.confluent.io/confluent-cli/rpm/confluent-cli.repo grabbing file https://packages.confluent.io/confluent-cli/rpm/confluent-cli.repo to /etc/yum.repos.d/confluent-cli.repo repo saved to /etc/yum.repos.d/confluent-cli.repo
Clear the YUM caches:
sudo yum clean all
You should see output similar to:
Loaded plugins: fastestmirror, ovl Cleaning repos: Confluent-CLI base endpoint extras updates Cleaning up list of fastest mirrors
Install the Confluent CLI:
sudo yum install confluent-cli
You should see output similar to:
Loaded plugins: fastestmirror, ovl Determining fastest mirrors * base: centos-distro.1gservers.com * extras: mirror.keystealth.org * updates: mirrors.unifiedlayer.com Confluent-CLI base endpoint extras updates (1/6): base/7/x86_64/group_gz (2/6): extras/7/x86_64/primary_db (3/6): Confluent-CLI/primary_db (4/6): endpoint/7/x86_64/primary_db (5/6): base/7/x86_64/primary_db (6/6): updates/7/x86_64/primary_db Resolving Dependencies --> Running transaction check ---> Package confluent-cli.x86_64 0:3.48.0-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================================== Installing: confluent-cli x86_64 3.48.0-1 Confluent-CLI 19 M Transaction Summary ======================================================================================================================================================================================================================== Install 1 Package Total download size: 19 M Installed size: 54 M Is this ok [y/d/N]: y Downloading packages: confluent-cli-3.48.0-1.x86_64.rpm Running transaction check Running transaction test Transaction test succeeded Running transaction Verifying : confluent-cli-3.48.0-1.x86_64 Installed: confluent-cli.x86_64 0:3.48.0-1 Complete!
Confluent Platform
If you installed Confluent Platform using YUM, you should already have a version of the Confluent CLI. In most cases, Confluent Platform users should use the version of Confluent CLI provided with Confluent Platform. However, if you want to install the latest version of the Confluent CLI from the CLI repository, you can use the following steps:
Install the Confluent CLI YUM public key:
sudo rpm --import https://packages.confluent.io/confluent-cli/rpm/archive.key
Add the Confluent CLI repository to your YUM configuration:
yum-config-manager --add-repo https://packages.confluent.io/confluent-cli/rpm/confluent-cli.repo
Uninstall the existing version of the Confluent CLI. This will also uninstall
confluent-platform
, but not the individual packages included with Confluent Platform:sudo yum remove confluent-cli
You should see output similar to:
Loaded plugins: fastestmirror, ovl Resolving Dependencies --> Running transaction check ---> Package confluent-cli.x86_64 0:7.5.3-1 will be erased --> Processing Dependency: confluent-cli = 7.5.3 for package: confluent-platform-7.5.3-1.noarch --> Running transaction check ---> Package confluent-platform.noarch 0:7.5.3-1 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================================================= Removing: confluent-cli x86_64 7.5.3-1 @Confluent 208 M Removing for dependencies: confluent-platform noarch 7.5.3-1 @Confluent 0.0 Transaction Summary ============================================================================================================================================================================================================= Remove 1 Package (+1 Dependent package) Installed size: 208 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : confluent-platform-7.5.3-1.noarch Erasing : confluent-cli-7.5.3-1.x86_64 Verifying : confluent-platform-7.5.3-1.noarch Verifying : confluent-cli-7.5.3-1.x86_64 Removed: confluent-cli.x86_64 0:7.5.3-1 Dependency Removed: confluent-platform.noarch 0:7.5.3-1 Complete!
Clear the YUM caches:
sudo yum clean all
You should see output similar to:
Loaded plugins: fastestmirror, ovl Cleaning repos: Confluent-CLI base endpoint extras updates Cleaning up list of fastest mirrors ...
Temporarily disable the Confluent Platform repository:
sudo yum --disablerepo=Confluent install confluent-cli
This command assumes that users have added the Confluent Platform repository using the
confluent.repo
file provided in Install Confluent Platform using Systemd on RHEL and CentOS. If you who have modified the repository ID, you must provide the ID as the argument to--disablerepo
in place ofConfluent
in the previous step. You can view repository IDs and names usingyum repolist all
.
Note
Updating the CLI through YUM, or installing Confluent Platform through YUM will cause this version of the CLI to be replaced with the version provided by Confluent Platform.
To install the Confluent CLI on Windows, complete the following steps:
Download the latest Windows ZIP file from
https://github.com/confluentinc/cli/releases/latest
.Unzip the following file:
confluent_X.X.X_windows_amd64.zip
Run
confluent.exe
.
Other installation methods¶
This section includes other methods you can use to install the Confluent CLI.
Docker¶
To install the Confluent CLI on Docker Desktop, run the following command to pull the latest CLI version:
docker pull confluentinc/confluent-cli:latest
You can also install a specific version:
docker pull confluentinc/confluent-cli:<version>
Confluent Platform installation package¶
Confluent Platform installation packages include the Confluent CLI binaries for each of the operating system and architecture types that the Confluent CLI supports.
Confluent Community software users must download the Confluent CLI separately and configure it manually.
To use the Confluent CLI in the Confluent Platform package:
Set the Confluent Platform home environment variable:
export CONFLUENT_HOME=<The directory where Confluent is installed>
Add the location of the CLI to the
PATH
:export PATH=$CONFLUENT_HOME/bin:$PATH
Install alternative version in Confluent Platform package¶
The version of the Confluent CLI used by Confluent Platform can be changed by downloading a specific Confluent CLI binary and using it to replace the current binary.
When you download and install the Confluent CLI outside of the Confluent Platform package, ensure you install a Confluent CLI version that is compatible with the version of Confluent Platform you are running. For reference, see the /platform/current/.
Download the appropriate version of the Confluent CLI.
Use the downloaded binary to replace the existing Confluent CLI binary located in subdirectories of
$CONFLUENT_HOME/libexec/cli/
.For example, on macOS, which is the
darwin
operating system type andamd64
architecture type:cp <cli binaries> $CONFLUENT_HOME/libexec/cli/darwin_amd64/
Tarball or ZIP installation¶
Download and install the most recently released CLI binaries for your platform:
Set the
PATH
environment to include the directory that you downloaded the CLI binaries in the previous step:export PATH=<path-to-cli>:$PATH
Optionally, if you do not have enough space in the default directory that CLI stores logs and data, set the
CONFLUENT_CURRENT
environment variable to use a different directory:export CONFLUENT_CURRENT=<path-to-confluent-local-data>
Verify¶
You can confirm the version and the OS type of the CLI with the following command:
confluent version
Upgrade¶
Use the confluent update
command to upgrade from an earlier version of the
Confluent CLI to a newer version. For the full syntax, see confluent update.
To ensure compatibility, updates using the confluent update
command are
disabled for the CLI packaged with Confluent Platform. If you need to upgrade to a later
version of the CLI, see Install alternative version in Confluent Platform package.
Confluent Platform properties files¶
The following list includes the default Confluent Platform services configuration properties
files, where $CONFLUENT_HOME
is the directory where you installed Confluent Platform. You
reference or modify the appropriate file when you work with a Confluent Platform service.
- Connect:
$CONFLUENT_HOME/etc/schema-registry/connect-avro-distributed.properties
- Control Center:
$CONFLUENT_HOME/etc/confluent-control-center/control-center-dev.properties
- Kafka:
$CONFLUENT_HOME/etc/kafka/server.properties
- REST Proxy:
$CONFLUENT_HOME/etc/kafka-rest/kafka-rest.properties
- ksqlDB:
$CONFLUENT_HOME/etc/ksqldb/ksql-server.properties
- Schema Registry:
$CONFLUENT_HOME/etc/schema-registry/schema-registry.properties
- ZooKeeper:
$CONFLUENT_HOME/etc/kafka/zookeeper.properties