A k9s inspired terminal ui for kaf
It uses the same configuration file as kaf so you can use your existing kaf configuration to browse between kafkas.
$ go run main.go -h
Explore different kafka broker in a k9s fashion with quick switches between topics, consumer groups and brokers
Usage:
kafui [flags]
Flags:
--config string config file (default is $HOME/.kaf/config)
-h, --help help for kafui
--mock Enable mock mode: Display mock data to test various functions without a real kafka brokerOn windows you can install kafui using the following
winget install kafuiIf you're using Homebrew on macOS or Linux, you can easily install kafui using the following commands:
brew tap benny93/kafui
brew install kafuiThis will tap into the benny93/kafui repository and install the kafui package on your system.
Install via downloader script:
curl https://raw.githubusercontent.com/Benny93/kafui/main/godownloader.sh | BINDIR=$HOME/bin bash-
Set Environment Variables (For Unix-like Systems):
Make sure you have the
GOPATHenvironment variable set. Add the following lines to your shell configuration file (e.g.,~/.bashrcfor Bash,~/.zshrcfor Zsh):echo 'export GOPATH=$(go env GOPATH)' >> ~/.bashrc echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc
For Bash, use
~/.bash_profileinstead of~/.bashrc.For Zsh, use
~/.zshrc.These commands ensure that the
GOPATHandGOPATH/binare added to yourPATHenvironment variable, allowing you to execute Go binaries globally. -
Set Environment Variables (For Windows):
Open Command Prompt as an administrator and run the following commands:
setx GOPATH "%USERPROFILE%\go" setx PATH "%PATH%;%GOPATH%\bin"
These commands set the
GOPATHenvironment variable to%USERPROFILE%\goand add%GOPATH%\binto thePATHenvironment variable, respectively. After running these commands, you might need to restart your Command Prompt session for the changes to take effect. -
Install via Go:
Once the environment variables are set, you can install the package using
go install. Run the following command:go install github.com/Benny93/kafui@latest
This command fetches the latest version of the
kafuipackage from the specified GitHub repository and installs it in yourGOPATH/bindirectory. After installation, you can execute thekafuicommand from anywhere in your terminal.
First setup the config file at $HOME/.kaf/config using kaf
kaf config add-cluster local -b localhost:9092replace localhost:9092 with your broker.
If you use a schema registry open the config file and add the required configurations.
See https://github.com/birdayz/kaf?tab=readme-ov-file#configuration
Your configuration may look something like this:
current-cluster: local
clusteroverride: ""
clusters:
- name: local
version: ""
brokers:
- localhost:9092
SASL: null
TLS: null
security-protocol: ""
schema-registry-url: localhost:8085
schema-registry-credentials: null