DEV Community

Cover image for Kafka Shell - Supercharge Your Apache Kafka CLI
Shawn Seymour
Shawn Seymour

Posted on

Kafka Shell - Supercharge Your Apache Kafka CLI

Kafka Shell

Are you working with the Apache Kafka command line tools? Ever had trouble remembering what options are available, or remembering URLs for your clusters? Kafka shell to the rescue!

Kafka Shell is a supercharged, interactive Kafka shell that is built on top of the existing Kafka command line tools. It features auto completion, auto suggestion from history, key commands, and much more. It's an open source project I just released, built with Python.


Auto completion of Kafka commands, options, and configuration options.

Auto Completion

Configuration of clusters, schema registries, and properties that will be automatically added to commands being run.


Supported Commands

Kafka shell currently supports a lot of most popular Kafka command line tools, such as Kafka-topics, kafka-console-consumer, and more. I plan to add the rest after I get some initial feedback!

  • kafka-topics
  • kafka-configs
  • kafka-console-consumer
  • kafka-console-producer
  • kafka-avro-console-consumer
  • kafka-avro-console-producer
  • kafka-verifiable-consumer
  • kafka-verifiable-producer
  • kafka-broker-api-versions
  • kafka-consumer-groups
  • kafka-delete-records
  • kafka-log-dirs
  • kafka-dump-log
  • kafka-acls
  • ksql

Get It Now

Let me know what you think -- and I hope this can help improve working with Apache Kafka. :)

GitHub logo devshawn / kafka-shell

⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.


Build Status codecov PyPI PyPI - Python Version License

A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.

Kafka shell allows you to configure a list of clusters, and properties such as --bootstrap-server and --zookeeper for the currently selected cluster will automatically be added when the command is run. No more remembering long server addresses or ports!


Kafka shell requires python and pip. Kafka shell is a wrapper over the existing Kafka command-line tools, so those must exist within your PATH.

You can install kafka-shell using pip:

pip install kafka-shell


Kafka shell is an interactive shell. You can run it from the terminal by:


From here, you can start typing kafka and the autocomplete will kick in.

Key Commands

  • Change Cluster: The selected cluster commands are run against can be cycled through by pressing F2.
  • Fuzzy Search: By default, fuzzy search of commands is enabled…

Top comments (0)