Kafka CLI inspired by kubectl & docker
Install from source:
go get -u github.com/birdayz/kaf/cmd/kaf
Install binary:
curl https://raw.githubusercontent.com/birdayz/kaf/master/godownloader.sh | BINDIR=$HOME/bin bash
Install on Archlinux via AUR:
yay -S kaf
Add a local Kafka with no auth
kaf config add-cluster local -b localhost:9092
Select cluster from dropdown list
kaf config select-cluster
Describe and List nodes
kaf node ls
List topics, partitions and replicas
kaf topics
Describe a given topic called mqtt.messages.incoming
kaf topic describe mqtt.messages.incoming
List consumer groups
kaf groups
Describe a given consumer group called dispatcher
kafa group describe dispatcher
Write message into given topic from stdin
echo test | kaf produce mqtt.messages.incoming
See the examples folder
Source the completion script in your shell commands file:
Bash Linux:
kaf completion bash > /etc/bash_completion.d/kaf
Bash MacOS:
kaf completion bash > /usr/local/etc/bash_completion.d/kaf
Zsh
kaf completion zsh > "${fpath[1]}/_kaf"
Fish
kaf completion fish > ~/.config/fish/completions/kaf.fish
Powershell
Invoke-Expression (@(kaf completion powershell) -replace " ''\)$"," ' ')" -join "`n")