# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix 安装 kcat

查看 kcat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:kcat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kcat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install kcat
```

  证据: MacPorts ports tree: net/kcat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add kcat
```

  证据: Alpine Linux edge package indexes: kcat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install kcat
```

  证据: Debian stable package indexes: kcat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install kcat
```

  证据: Fedora Rawhide package metadata: kcat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#kcat
```

  证据: nixpkgs package indexes: pkgs/by-name/kc/kcat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:kcat
- **软件包管理器:** Homebrew
- **版本:** 1.7.0
- **来源摘要:** Generic command-line non-JVM Apache Kafka producer and consumer
- **主页:** <https://github.com/edenhill/kcat>
- **仓库:** <https://github.com/edenhill/kcat>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- kcat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.7.0
## 项目历史与用法

kcat is the Apache Kafka command-line producer and consumer formerly known as kafkacat. Its README describes it as a generic non-JVM client and a netcat-like tool for Kafka.

### 项目历史

Magnus Edenhill created the project in 2014 around librdkafka, giving Kafka operators a small native command-line client instead of requiring JVM tooling for quick production, consumption, metadata inspection, and scripting tasks.

The project kept the kafkacat name through the 1.6 series and then renamed to kcat in the 1.7.0 release in August 2021 to follow Apache Software Foundation trademark policy. The changelog says the rename did not otherwise change the program.

### 采用历史

kcat became widely packaged because it fills a common operational gap for Kafka clusters: quick CLI inspection and data movement. The batch input records packages across Homebrew, Debian, Ubuntu, Fedora, Alpine, MacPorts, and Nix, and the README documents package-manager installs and a Docker image.

### 使用方式

Common usage includes producing messages from stdin or files, consuming topics and partitions to stdout, listing cluster metadata with -L, joining balanced consumer groups with -G, printing JSON envelopes, using Confluent Schema Registry for Avro decoding, and passing librdkafka configuration with -X or config files.

### 为什么软件包爱好者会关心

kcat matters to package people because it is the small, scriptable Kafka tool that often gets installed beside kubectl, jq, and other operations CLIs. Its rename also created a packaging transition from kafkacat to kcat while retaining backward-compatible config paths for a period.

### 时间线

- 2014-03-30: GitHub repository created.
- 2014-04-07: 1.0.0 release published.
- 2020-07-21: 1.6.0 added transactional producer support.
- 2021-08-23: 1.7.0 renamed kafkacat to kcat.
- 2024: 1.8.0 changelog entry documents mock cluster mode.

### Related projects

- kcat is built on librdkafka and can integrate with Confluent Schema Registry through Avro deserialization support.

### 来源

- <https://github.com/edenhill/kcat>
- <https://github.com/edenhill/kcat/blob/master/CHANGELOG.md>
- <https://github.com/edenhill/kcat/releases>
- <https://github.com/edenhill/librdkafka>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/kcat.conf, ~/.config/kafkacat.conf
## 其他软件包管理器记录

- Debian apt - kcat - 1.7.1-3: normalized package name match | Debian stable package indexes: kcat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | producer and consumer for Apache Kafka | https://github.com/edenhill/kcat
- Nix - kcat: normalized package name match | nixpkgs package indexes: pkgs/by-name/kc/kcat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - kcat - 1.7.1-3: normalized package name match | Ubuntu 24.04 LTS package indexes: kcat from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | producer and consumer for Apache Kafka | https://github.com/edenhill/kcat
- apk - kcat - 1.7.1-r3: normalized package name match | Alpine Linux edge package indexes: kcat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic command-line non-JVM Apache Kafka producer and consumer | https://github.com/edenhill/kcat
- dnf - kcat - 1.7.1-10.fc45: normalized package name match | Fedora Rawhide package metadata: kcat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Generic command line non-JVM Apache Kafka producer and consumer | https://github.com/edenhill/kcat
- MacPorts - kcat: normalized package name match | MacPorts ports tree: net/kcat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/kcat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kcat.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
