joeirimpan / kaf

Modern CLI for Apache Kafka, written in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kaf

Kafka CLI inspired by kubectl & docker

Actions Status GoReportCard GoDoc

asciicinema

Install

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

Usage

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

kaf group describe dispatcher

Write message into given topic from stdin

echo test | kaf produce mqtt.messages.incoming

Configuration

See the examples folder

Shell autocompletion

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")

About

Modern CLI for Apache Kafka, written in Go.

License:Apache License 2.0


Languages

Language:Go 89.8%Language:Shell 10.0%Language:Makefile 0.2%