Command reference
General
completionPrint a shell completion script for bash, zsh, or fishdoctorReport where connection settings come from — config file, environment, profile, or flaginitScaffold a kafka.config file in the current directorypingCheck connectivity to the clusterprofilesList the named connection profiles configured under cli.profilesstudioLaunch the local web UI for browsing and driving the cluster
acl
acl addCreate one or more ACLs, granting or denying an operationacl listList ACLs matching a filter, or every ACL by defaultacl removeDelete every ACL matching a filter, per principal
admin
admin callCall any Admin method by name — the escape hatch for everything without its own commandadmin methodsList every Admin method admin call can reach, and how each is classified
cluster
cluster elect-leadersTrigger a preferred or unclean leader election on one or more partitionscluster featuresDescribe supported and finalized feature versionscluster infoDescribe the cluster: its brokers, controller, and cluster idcluster log-dirsDescribe log directories and their partition sizes, per brokercluster quorumDescribe the metadata quorum: leader, voters, and observerscluster raft-voter addAdd a voter to the KRaft metadata quorumcluster raft-voter removeRemove a voter from the KRaft metadata quorumcluster reassign executeExecute a partition reassignment from a kafka-reassign-partitions.sh-shaped JSON filecluster reassign listList every active partition reassignmentcluster unregister-brokerUnregister a broker from the cluster (KRaft broker decommissioning)cluster update-featuresUpgrade, safe-downgrade, or unsafe-downgrade one or more finalized feature versions
config
config describeDescribe the configs of one or more resourcesconfig list-resourcesList every config resource the broker knows aboutconfig setSet one or more config entries on a resourceconfig unsetRemove one or more config entries from a resource, reverting them to default
group
group deleteDelete one or more consumer groupsgroup delete-offsetsDelete a consumer group’s committed offsets on one or more topicsgroup describeDescribe one or more consumer groupsgroup listList every consumer group the cluster knows aboutgroup offsetsShow a consumer group’s committed offsetsgroup remove-membersRemove one or more static members from a consumer group’s sessiongroup reset-offsetsReset a consumer group’s committed offsets on one or more topics
quota
quota alterSet or remove client quota values for one entityquota describeDescribe client quotas matching an entity filter
scram
scram deleteDelete a SCRAM credential for one or more usersscram listList SCRAM credentials for one or more users, or every userscram setCreate or update a SCRAM credential for one or more users
share-group
share-group deleteDelete one or more share groupsshare-group describeDescribe one or more share groupsshare-group listList every share group the cluster knows aboutshare-group offsetsRead, set, or delete a share group’s committed start offsets
token
token createCreate a delegation tokentoken expireExpire a delegation token, immediately by defaulttoken listList delegation tokens, optionally filtered by ownertoken renewRenew a delegation token, extending its expiry
topic
topic add-partitionsRaise a topic to a new total partition counttopic createCreate one or more topicstopic deleteDelete one or more topicstopic delete-recordsDelete records before a given offset, per partitiontopic describeDescribe one or more topicstopic listList every topictopic offsetsShow partition offsets for a topictopic producersShow a topic’s active producer state, per partition
txn
txn abortWrite an abort marker for one in-flight transaction on a topic partitiontxn describeDescribe one or more transactional idstxn fenceFence out a transactional id’s current producer, bumping its epochtxn listList transactions known to the cluster, optionally filteredtxn terminateForce-terminate a transactional id’s current transaction