blog by OSO

7 Must-Have CLI Tools Every Apache Kafka Engineer Should Know in 2025

Sion Smith
Sion Smith 7 August 2025
OSO guide to seven must-have Kafka CLI tools including kcat, kaf, kafkactl and topicctl, with white title text on a navy panel and a lime Blogs label.

The OSO engineers have worked with over 200 Kafka deployments, and there’s one pattern we see repeatedly: teams struggling with the basic kafka-console-consumer and kafka-topics shell scripts, spending hours on tasks that should take minutes. The difference between novice and expert Kafka operations often comes down to knowing the right CLI tools for the job.

While Apache Kafka’s official shell scripts provide basic functionality, a powerful ecosystem of specialised CLI tools has emerged that can transform your Kafka operations from tedious manual work into streamlined, professional workflows. This guide covers the 7 essential CLI tools that separate expert Kafka engineers from the rest, showing you exactly when and how to use each one.

ToolBest forStandout feature
kcatMessage inspection and debuggingTimestamp-based consumption and an in-memory mock cluster
kafMulti-environment workInteractive cluster context switching
kafkactlEnterprise operationsACL management, protobuf support and rate-limited produce
topicctlInfrastructure as codeDeclarative YAML topic configs with dry runs
kcctlKafka Connectkubectl-style connector lifecycle commands
kaskadeVisual explorationTerminal UI with Schema Registry support
kcliQuick read-only browsingNavigate topics, partitions and messages from the terminal

Why is kcat the first Kafka CLI tool to learn?

Why it’s essential: kcat (formerly kafkacat) is described as “netcat for Kafka”: the most versatile tool for producing, consuming and inspecting Kafka data, with advanced offset management and serialisation support. It’s the first tool every Kafka engineer should master.

Core capabilities:

  • High-performance message production and consumption
  • Advanced offset positioning, including timestamp-based consumption
  • Schema Registry integration for Avro messages
  • Mock cluster creation for testing environments
  • Comprehensive metadata inspection

Essential commands:

kcat -C -b localhost:9092 -t my-topic -o beginning

kcat -C -b localhost:9092 -t my-topic \
     -f 'Topic: %t[%p], Offset: %o, Key: %k, Value: %s\n'

echo "user123:login_event" | kcat -P -b localhost:9092 -t events -K:

kcat -L -b localhost:9092

kcat -C -b localhost:9092 -t my-topic -o s@1640995200000

kcat -M 3

Expert usage: mock cluster creation for testing, timestamp-based consumption for incident investigation, filtering with Unix pipes, and Schema Registry integration for Avro messages. The OSO engineers use kcat daily for rapid message inspection and debugging production issues.

How does kaf simplify working with multiple clusters?

Why it’s essential: kaf eliminates repetitive typing with context management, allowing seamless switching between development, staging and production clusters with interactive selection. It transforms verbose Kafka commands into simple, intuitive operations.

Core capabilities:

  • Interactive cluster context switching
  • Simplified command syntax
  • Consumer group management with visual feedback
  • Built-in auto-completion
  • Consumer group offset manipulation

Essential commands:

kaf config add-cluster local -b localhost:9092
kaf config add-cluster prod -b prod-kafka:9092

kaf config select-cluster

kaf consume my-topic

kaf topics

kaf topic describe my-topic

kaf groups
kaf group describe my-consumer-group

kaf group commit my-group -t my-topic --offset latest --all-partitions

Expert usage: the OSO engineers configure kaf contexts for all environments (dev, staging, prod) at the start of each project. The interactive cluster selection prevents accidentally running commands against the wrong environment, a common cause of production incidents.

When should you use kafkactl?

Why it’s essential: kafkactl provides comprehensive functionality including ACL management, consumer group operations, protobuf support and direct Kubernetes integration. It’s designed for enterprise environments with complex security and operational requirements.

Core capabilities:

  • Comprehensive ACL management
  • Advanced consumer group operations
  • Protobuf and Avro message handling
  • Kubernetes native integration
  • Rate-limited message production
  • Dynamic auto-completion

Essential commands:

kafkactl consume my-topic --value-proto-type MyMessageType --proto-file schema.proto

cat messages.json | kafkactl produce my-topic --rate=100

kafkactl describe consumer-group my-group --partitions

kafkactl create acl --topic my-topic --operation read --principal User:alice --allow
kafkactl get acl --topics

kafkactl get topics --output yaml

kafkactl clone consumer-group source-group target-group

Expert usage: advanced features like rate limiting for message production, dynamic auto-completion, and plugins for AWS and Azure authentication. The OSO engineers particularly value the ACL management capabilities for enterprise security compliance.

How does topicctl bring GitOps to Kafka topics?

Why it’s essential: topicctl enables declarative management of Kafka topics using YAML configurations that integrate with version control and CI/CD pipelines. It brings infrastructure-as-code principles to Kafka topic management.

Core capabilities:

  • Declarative YAML-based topic definitions
  • GitOps workflow integration
  • Idempotent topic operations
  • Dry runs that show planned changes before anything is applied
  • Advanced replica placement strategies

Essential commands and configurations:

meta:
  name: user-events
  cluster: production
  environment: prod
spec:
  partitions: 12
  replicationFactor: 3
  retentionMinutes: 10080  # 7 days
  placement:
    strategy: balanced-leaders
  settings:
    cleanup.policy: delete
    compression.type: snappy
topicctl apply --dry-run topic-config.yaml

topicctl apply topic-config.yaml

topicctl repl --cluster-config cluster.yaml

topicctl get topics --cluster-config cluster.yaml

Expert usage: an infrastructure-as-code approach with guided, idempotent processes that make topic management self-service even for non-Kafka experts. Valid placement strategies are any, balanced-leaders, in-rack, cross-rack, static and static-in-rack. The OSO engineers implement topicctl in CI/CD pipelines to prevent configuration drift and enable proper change management.

How does kcctl manage Kafka Connect?

Why it’s essential: kcctl provides a kubectl-like experience for Kafka Connect operations, built as a native Quarkus application for fast start-up. It simplifies the complex world of Kafka Connect management.

Core capabilities:

  • kubectl-inspired command structure
  • Comprehensive connector lifecycle management
  • Configuration context management
  • Native binary performance
  • Intuitive connector inspection

Essential commands:

kcctl config set-context local --cluster http://localhost:8083

kcctl info

kcctl get plugins

kcctl apply -f debezium-postgres-connector.json

kcctl get connectors
kcctl describe connector my-postgres-connector

kcctl pause connector my-postgres-connector
kcctl resume connector my-postgres-connector
kcctl restart connector my-postgres-connector

kcctl delete connector my-postgres-connector

kcctl patch connector my-postgres-connector --set tasks.max=4

Expert usage: comprehensive connector lifecycle management with intuitive commands for registering, examining, restarting and deleting connectors. The OSO engineers use kcctl to standardise Kafka Connect operations across teams, reducing the learning curve for complex connector management.

Why use kaskade for visual exploration?

Why it’s essential: kaskade offers a text user interface (TUI) with real-time monitoring, topic filtering and Schema Registry support for interactive cluster exploration. It provides a visual, real-time view of your Kafka cluster.

Core capabilities:

  • Interactive terminal user interface
  • Real-time message streaming
  • Advanced filtering by key, value, header and partition
  • Schema Registry integration for Avro, JSON Schema and Protobuf
  • Topic and consumer group management
  • Automatic metadata refresh

Essential commands:

kaskade consumer -b localhost:9092 -t my-topic

kaskade consumer -b localhost:9092 -t avro-topic \
        -k registry -v registry \
        --registry url=http://localhost:8081

kaskade admin -b localhost:9092

kaskade consumer -b localhost:9092 -t my-topic \
        -k string -v json --earliest

kaskade consumer -b kafka:9093 -t my-topic \
        --kafka security.protocol=SASL_SSL \
        --kafka sasl.mechanism=PLAIN \
        --kafka sasl.username=user \
        --kafka sasl.password=pass

Configuration files: current kaskade releases keep connection settings (Kafka, Schema Registry and AWS IAM properties) in an INI file such as client.ini, passed with --config-file, and UI preferences such as themes and the refresh interval in ~/.config/kaskade/settings.yaml.

kaskade admin --config-file production.ini

Expert usage: deserialisation support for JSON, Avro and Protobuf with automatic refresh and comprehensive filtering. The OSO engineers use kaskade for real-time cluster monitoring during deployments and for training new team members on Kafka concepts through its intuitive visual interface.

When is kcli the right choice?

Why it’s essential: kcli is a lightweight, Go-based, read-only Kafka browser for the terminal. It lets you move from topics to partitions to individual messages without writing consumer code, which makes it ideal for quick inspection when you do not want any risk of changing the cluster.

Core capabilities:

  • Read-only by design: browse, never write
  • Navigate topics, partitions and messages interactively
  • Search a topic or partition for a string, and jump to an offset
  • Print the current view to stdout for piping into tools such as jq
  • Custom decoder plugins (for example protobuf) and TLS via environment variables

Essential commands:

kcli -a localhost:9092

kcli -a localhost:9092 -t my-topic -p 0 -o 1000

kcli -a localhost:9092 -d /path/to/decoder.so

kcli -a localhost:9092 | jq .age

Expert usage: because kcli cannot produce, create topics or change offsets, it is a safe way to give developers quick visibility of message contents. Produce, topic and consumer group changes belong to kcat, kaf or kafkactl.

Which Kafka CLI tool should you use for each job?

JobToolWhy
Message inspection and debuggingkcatVersatile, scriptable and precise; the go-to tool for investigating production issues
Multi-environment managementkafInteractive cluster selection prevents costly mistakes across environments
Enterprise operationskafkactlACLs, protobuf and cloud authentication plugins for complex security requirements
Infrastructure managementtopicctlDeclarative, version-controlled topic changes with auditability
Connect operationskcctlStreamlined connector lifecycle management
Visual explorationkaskadeInteractive monitoring and training
Quick read-only browsingkcliSafe inspection with no write access

How should you roll these tools out?

Week 1: replace basic kafka-console scripts with kcat. This single change will immediately improve your productivity and debugging capabilities.

Week 2: implement context management with kaf or kafkactl. Set up configurations for all your environments and stop typing bootstrap servers manually.

Week 3: establish declarative topic management with topicctl. Move your topic configurations into version control and implement proper change management.

Week 4: deploy specialised tools (kcctl, kaskade, kcli) based on your specific operational needs and team requirements.

How do you combine Kafka CLI tools effectively?

The debugging workflow: combine kcat and kaskade for comprehensive message investigation. Use kcat for precise queries and kaskade for real-time visual exploration.

The deployment pipeline: integrate topicctl and kafkactl for infrastructure-as-code topic management with comprehensive operational capabilities.

The multi-cluster strategy: use kaf and kcctl for seamless environment management, particularly useful for teams managing multiple Kafka Connect clusters.

How should you manage tool configuration?

Standardise connection configurations across tools by using environment variables and configuration files. The OSO engineers maintain team-wide tool configurations in a shared repository, ensuring consistent setups across all team members.

Implement secure credential management using tools like HashiCorp Vault or AWS Secrets Manager, particularly important when using tools like kafkactl and kcctl in production environments.

Set up shell aliases and completion scripts for frequently used commands to maximise efficiency and reduce typing errors.

What should you do next?

The OSO engineers have witnessed teams reduce their Kafka operational overhead by 60% simply by adopting the right CLI tools. What used to require complex shell scripts and manual coordination becomes streamlined, repeatable processes.

Your next steps: start with kcat and kaf as your foundation; these two tools alone will transform your daily Kafka operations. Then progressively add specialised tools based on your specific requirements. The investment in learning these tools pays immediate dividends in reduced errors, faster troubleshooting and improved team productivity.

The competitive advantage: knowing these CLI tools isn’t just about professional competency; it’s about operational excellence. Teams using modern Kafka tooling consistently outperform those stuck with basic shell scripts, delivering more reliable systems with less operational overhead.

Key takeaway: master kcat and kaf first, put topics under version control with topicctl, and add kafkactl, kcctl, kaskade and kcli where they solve a real operational problem. The right toolkit turns hours of shell scripting into minutes of repeatable work.

Frequently asked questions

What is the best Kafka CLI tool?

For most engineers it is kcat. It produces, consumes and inspects messages, reads cluster metadata, consumes from a timestamp and can even start an in-memory mock cluster for tests, so it covers the widest range of day-to-day tasks.

Is kcat the same as kafkacat?

Yes. kcat is the new name of kafkacat; the tool and its flags are the same. Older guides and Docker images may still use the kafkacat name.

How do I manage Kafka topics as code?

Use topicctl. You describe each topic in a YAML file (partitions, replication factor, retention, placement strategy and settings), keep the files in Git, run topicctl apply --dry-run to preview changes and then topicctl apply from CI/CD.

Which CLI tool manages Kafka Connect?

kcctl. It gives Kafka Connect a kubectl-style interface: set a context for the Connect cluster, then list plugins, apply connector configs, describe, pause, resume, restart, patch and delete connectors.

Can kcli produce messages or change offsets?

No. kcli is a read-only terminal browser for topics, partitions and messages. Use kcat, kaf or kafkactl when you need to produce data, create topics or reset consumer group offsets.

Get started with OSO professional services for Apache Kafka

Want your team working faster with Kafka tooling? Speak with our engineers about standardising CLI tools, GitOps topic management and operations.

CONTACT US
OSO
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.