Install Confluent CLI¶
Use this documentation to install the Confluent CLI. Ensure you meet all requirements before moving forward.
To install the Confluent CLI, use any of the following methods:
- Homebrew
- APT
- YUM
- Scripted installation
- Confluent Platform installation package
- Tarball or ZIP installation
Homebrew¶
macOS and Linux users can install the latest version of Confluent CLI using the following Homebrew command:
brew install confluentinc/tap/cli
APT¶
If you are a Debian or Ubuntu user, you can install the latest version of Confluent CLI using the APT package manager:
Install the Confluent CLI APT public key.
wget -qO - https://packages.confluent.io/confluent-cli/deb/archive.key | sudo apt-key add
Install
add-apt-repository
(included in thesoftware-properties-common
package) if it is not already installed.sudo apt install software-properties-common
Add the Confluent CLI repository to your APT configuration:
sudo add-apt-repository "deb https://packages.confluent.io/confluent-cli/deb stable main"
You should see output similar to:
Get:1 https://packages.confluent.io/confluent-cli/deb stable InRelease [7536 B] Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease Get:4 https://packages.confluent.io/confluent-cli/deb stable/main amd64 Packages [450 B] Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Fetched 7986 B in 1s (13.2 kB/s) Reading package lists... Done
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 the Confluent CLI APT public key:
wget -qO - https://packages.confluent.io/confluent-cli/deb/archive.key | sudo apt-key add
Add the Confluent CLI repository to your APT configuration:
sudo add-apt-repository "deb https://packages.confluent.io/confluent-cli/deb stable main"
Uninstall the existing version of the Confluent CLI. This will also uninstall
confluent-platform
, but not the individual packages included with Confluent Platform.sudo apt remove confluent-cli
You should see output similar to:
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: confluent-ce-kafka-http-server confluent-common confluent-control-center confluent-control-center-fe confluent-hub-client confluent-kafka-connect-replicator confluent-kafka-mqtt confluent-kafka-rest confluent-ksqldb confluent-metadata-service confluent-rebalancer confluent-rest-utils confluent-schema-registry confluent-schema-registry-plugins confluent-server confluent-server-rest confluent-telemetry Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: confluent-cli confluent-platform 0 upgraded, 0 newly installed, 2 to remove and 40 not upgraded. After this operation, 218 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 23954 files and directories currently installed.) Removing confluent-platform (7.5.3-1) ... Removing confluent-cli (7.5.3-1) ...
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.
YUM¶
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.
Scripted installation¶
You can use the following instructions to install the latest version of the Confluent CLI:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- latest
To use the scripted installation method on Microsoft Windows, you might need to
install an appropriate Linux environment, such as the Windows Subsystem for
Linux, to have the
curl
and sh
commands available. The installation script detects which
system you are running on and downloads the appropriate binary.
To download Confluent CLI directly from GitHub, see the following sections:
Windows¶
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
.
Default directory¶
To install the latest version of the Confluent CLI in the default directory:
Download and install the latest version in the default directory,
./bin
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- latest
Add the
./bin
directory to your$PATH
:export PATH=$(pwd)/bin:$PATH
Custom directory¶
To install a specific version of Confluent CLI into a custom directory:
List all available Confluent CLI versions:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -l
Download a specific version listed in the above output list.
The default download directory is
./bin
.To download and install a specific version of the Confluent CLI, specify
v
followed by the version number:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- v<version>
To download and install the Confluent CLI in a custom directory, specify
-b
followed by a custom directory path,<path-to-cli>
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -b <path-to-cli> v<version>
For example, to download version 3.51.0 of Confluent CLI to
/user/local/bin
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -b /usr/local/bin v|release|
Set the
$PATH
environment variable 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>
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 as described in Scripted installation.
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