Unlock the full power of your event streams with Stream Governance | Learn More

Confluent CLI Launches Exciting New Features and an Intuitive UI

With so many technologies in the modern development ecosystem, a common complaint is having to go through the mental gymnastics of adopting new products and keeping up with ever-expanding feature sets. At the same time, modern tech stacks such as CI/CD pipelines require large amounts of automation, which is often particularly painful to achieve with low-level infrastructure like databases and data platforms.

Confluent solves these challenges by empowering developers, operators, and architects with intuitive command line interfaces (CLIs) for managing cloud and on-prem Confluent deployments. The ccloud and confluent CLIs help you harness the full power of data in motion with a rich set of management and automation capabilities.

Here’s an example that creates a fully managed Apache Kafka® cluster in Confluent Cloud on AWS:

$ ccloud kafka cluster create <name> --cloud aws --region us-west-2

This blog post covers some of the exciting new features that have been engineered into our cloud and on-prem CLI tools and how you can benefit from these new developments.

CLI now supported on additional platforms

Confluent’s CLIs have always worked on Windows, Mac, and Linux. We have recently added support for new operating systems and distribution mechanisms.

Arm-based Macs (darwin/arm64/M1 Macs)

Users with Apple’s newest generation of Mac computers, which use the arm64 CPU architecture, can seamlessly run Confluent’s CLIs on their machines. Native darwin/arm64 builds are available as of ccloud and confluent v1.27.0. Customers can follow the installation instructions for cloud or on-prem, respectively, to install the latest CLI version on their computer.

Alpine and official Docker images

Both of Confluent’s CLIs now natively support Alpine Linux, which is commonly used in Docker-based workflows. To that end, we have also published official images on Docker Hub for both ccloud and confluent. You can now build powerful Docker-based automation infrastructure without ever explicitly installing one of our CLIs. For example, in order to list your current Kafka clusters with JSON-formatted output, you can run:

$ docker run -e CCLOUD_EMAIL='your email address' \
             -e CCLOUD_PASSWORD='your password' \
             -it \
             confluentinc/ccloud-cli:latest \
             /ccloud kafka cluster list -o json

Non-interactive login with environment variables

Both of Confluent’s CLIs now support non-interactive login as well, which is particularly useful in automation scenarios.

  • For ccloud, you can specify CCLOUD_EMAIL and CCLOUD_PASSWORD, which correspond to your Confluent Cloud credentials
  • For confluent, you can specify CONFLUENT_USERNAME and CONFLUENT_PASSWORD, which correspond to the credentials used to log in to your Confluent Platform environment (i.e., metadata service credentials)
  • Additionally, for confluent, you can specify the CONFLUENT_MDS_URL environment variable, which provides the host and port of your metadata service (MDS) instance, as well as the CONFLUENT_CA_CERT_PATH environment variable, in case you have configured MDS to use self-signed or custom certificates that are not part of the system truststore

Less typing thanks to stateless command execution

Most CLI commands can now be executed in a stateless fashion, which saves you from a lot of unnecessary typing.

For instance, rather than running this long sequence of commands:

$ ccloud environment use <environment-id>
$ ccloud kafka cluster use <kafka-cluster-id>
$ ccloud kafka topics list

You can now simply run:

$ ccloud kafka topic list --environment abc123 --cluster lkc-zyx987

One advantage of stateless command execution is that multiple users can execute CLI commands on the same computer. For example, a server used for continuous integration jobs can support multiple parallel jobs that use the ccloud CLI without worrying about the values stored in or corrupting the ~/.ccloud/config.json configuration file.

Zero to hero with the Confluent Cloud CLI: ccloud signup

It is now possible to sign up for Confluent Cloud right from the CLI. If you haven’t tried Confluent Cloud yet, you can get started by installing ccloud with a simple curl command and then running ccloud signup. After your email is verified, you can create Kafka clusters, configure ksqlDB apps, and more. Payment information can also be entered and managed using the subcommands of ccloud admin payment.

The video below shows how easy it is to get started with Confluent Cloud using the latest version of the CLI:

Completion improvements for ccloud shell

ccloud shell drops you into an interactive environment with rich contextual information and helpful autocompletion for working with your Confluent Cloud infrastructure. The shell environment now supports server-side autocompletion for values of positional and flag arguments. For instance, once you’re in the ccloud shell, beginning to type “kafka cluster update” will result in the CLI shell suggesting IDs of Kafka clusters in your current environment, as shown in the video below.

Conclusion

With the addition of Docker images, support for logins based on environment variables, and stateless command execution, Confluent’s CLIs are well suited for a wide array of automation tasks and other production use cases. At the same time, M1 Mac support and improvements to the ccloud shell are improving the CLIs’ interactive experiences for end users. Finally, newer commands like ccloud signup and user management make the CLIs more complete interfaces for Confluent’s rich functionality.

If you are looking to get started with Confluent’s CLIs or with Confluent in general, you can find quick installation guides for our cloud and on-prem CLIs in the documentation.

Get in touch

The CLI team is highly responsive to user feedback and is interested in hearing about both bug reports and feature requests—any way to help us serve users better. If you would like to provide any suggestions or feedback, feel free to file a reach out on the Confluent Forum, send us an email at cli-team@confluent.io, or file a ticket through Confluent Support. We look forward to hearing from you!

Get In Touch

David Hyde is the engineering lead for the CLI Team at Confluent.

Did you like this blog post? Share it now

Subscribe to the Confluent blog

More Articles Like This

Designing and Architecting the Confluent CLI

It is often difficult enough to build one application that talks to a single middleware or backend layer; e.g., a whole team of frontend engineers may build a web application

Building Real-Time Event Streams in the Cloud, On Premises, or Both with Confluent

To the developer or architect seeking to provide their business with as much value as possible, what is the best way to start working with data in motion? Choosing Apache

Announcing Pull Queries in Preview in Confluent Cloud ksqlDB

“Persistent” queries have historically formed the basis of ksqlDB applications, which continuously transform, enrich, aggregate, materialize, and join your Apache Kafka® data using a familiar SQL interface. ksqlDB continuously executes