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
pip. Kafka shell is a wrapper over the existing Kafka command-line tools, so
those must exist within your
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.
- Change Cluster: The selected cluster commands are run against can be cycled through by pressing
- Fuzzy Search: By default, fuzzy search of commands is enabled. This can be toggled on & off by pressing
- In-line Help: By default, in-line help is shown along side the drop-down suggestion list. This can be toggled on & off by pressing
- Exit: The shell can be exited by pressing
F10or by typing
Kafka shell allows you to configure settings and Kafka clusters to run commands against through a configuration file.
By default, when
kafka-shell is first run, a directory in your home directory is generated at
~/.kafka-shell. A configuration file called
config.yaml is generated in that new folder. It is a YAML file containing details about clusters,
kafka-shell configuration, and more.
See configuration to add a cluster to your configuration or to set other
Kafka shell simplifies running complex Kafka CLI commands as well as provides smart auto-completion of commands, options, and more. /Users/shawn/.kafka-shell/config.yaml
- Auto-completion of commands, options, and configurations
- Configure clusters to run commands against and switch between them
- Fish-style auto suggestions
- Command history
- Contextual help
- Toolbar options
Completion of Configurations
Auto completion of Kafka configuration keys and their values.
Configure Clusters, Schema Registries, & More
Configure clusters and their properties will automatically be added to commands being run.
Currently, the following commands are supported:
Currently, kafka-shell has helper commands:
exit: exit the shell
clear: clear the shell
cluster-select: select a cluster
cluster-describe: describe a cluster config
In-line help for each command and option is shown by default. This can be toggled by
Subscribe to Python Awesome
Get the latest posts delivered right to your inbox