# 使用 Homebrew, Nix 安装 topicctl

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

## 安装

```sh
sudo av install brew:topicctl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install topicctl
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#topicctl
```

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

## 软件包事实

- **软件包键:** brew:topicctl
- **软件包管理器:** Homebrew
- **版本:** 2.0.2
- **来源摘要:** Declarative Kafka topic management
- **主页:** <https://github.com/segmentio/topicctl>
- **仓库:** <https://github.com/segmentio/topicctl>
- **最后更新:** 2026-07-26T00:51:25+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- topicctl (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

topicctl is Segment's command-line tool for declarative Apache Kafka topic management. Its official README frames the project around applying topic changes from YAML and using a REPL to inspect brokers, topics, consumer groups, messages, offsets, partitions, ACLs, and related Kafka resources.

### 项目历史

The project was created to make Kafka topic management more transparent and user-friendly for Segment's operational use. The README says standard Kafka tooling was tedious and error-prone for this job because it lacked a standard declarative format that could be checked into Git and required multiple commands with different interfaces to understand cluster state.

topicctl's design borrows from kubectl-style declarative operations: users keep cluster and topic definitions as YAML, run apply/check/bootstrap/rebalance style commands, and inspect cluster state interactively. The README also documents a later revamp from the v0 line to support direct cluster access without ZooKeeper and add TLS/SSL and SASL security options.

### 采用历史

Its adoption niche is infrastructure teams running Kafka who want package-manager-installable tooling rather than bespoke scripts. The input package facts list both Homebrew and Nix packaging, while the official README also documents Go install, source build, and Docker image installation paths.

### 使用方式

Common usage is to store cluster configuration in cluster.yaml and topic definitions under topics/*.yaml, then use topicctl apply to create or update topics so the live cluster matches the desired files. The README's quick tour also shows topicctl repl for interactive exploration and commands such as get brokers, get topics, get partitions, get offsets, and tail.

For package-nerd workflows, topicctl is the kind of CLI that turns Kafka topic state into reviewable files: bootstrap can import existing topics into configs, check can validate config against cluster state, and apply/rebalance can be put into operational runbooks or CI-style review gates.

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

topicctl matters to package-focused operators because it packages a common Kafka administration pain point as a single Go CLI with declarative files, a REPL, and install paths that fit Homebrew, Nix, Docker, and go install workflows. It is most significant in Kafka/platform-engineering circles rather than as a general-purpose end-user tool.

### 时间线

- v0 era: Older implementation preserved on the official v0 branch for users who need to revert.
- v1 era: README documents a revamp adding ZooKeeper-less cluster access plus TLS/SSL and SASL options.
- 2026: GitHub releases page lists the v2.0.x line, including v2.0.0 and v2.0.2, with ongoing changes around placement strategy and bootstrapping.

### Related projects

- The README explicitly says topicctl was inspired by kubectl and points readers to Segment's data-digger as another Kafka-oriented command-line tool.

### 来源

- <https://github.com/segmentio/topicctl#readme>
- <https://github.com/segmentio/topicctl/releases>
- source_facts.package-manager


## 安全说明

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: cluster.yaml, topics/*.yaml
## 其他软件包管理器记录

- Nix - topicctl: normalized package name match | nixpkgs package indexes: pkgs/by-name/to/topicctl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/topicctl.yml](https://github.com/mxcl/pkgdb/blob/main/combined/topicctl.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
