Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Redpanda CLI (rpk)

$ rpk Official Med Risk
Redpanda Data · Database & Data · BSL-1.1 · macos / linux / windows

rpk is Redpanda's all-in-one CLI compatible with both Redpanda and Apache Kafka clusters. It manages topics, consumer groups, ACLs, Schema Registry, and Connect pipelines, offering structured --format json / -f json output and stdin/stdout JSON message streaming.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install redpanda-data/tap/redpanda
CLI vs MCP Decision CLI Preferred vs MCP

rpk streams topic records directly through shell pipes (rpk topic consume -f '%v\n' -n 10 | jq) and works against any Kafka/Redpanda cluster.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Broad --format json support across cluster info, topic list, topic consume, and group describe, plus --num bounded reads.

  • Supports --format json / -f json across admin and consume commands
  • --num <N> prevents topic consume from hanging in non-TTY shells
Trust & Safety 20 / 25

Profile isolation and SASL/TLS support are solid, though destructive commands (topic delete, group offset-delete) lack --dry-run.

  • Named profiles in rpk.yaml isolate clusters
  • No global --dry-run on topic delete or ACL deletions
Setup & Portability 13 / 15

Single binary distributed via Homebrew tap and official zip archives for macOS and Linux (Windows via WSL/binary).

  • Standalone binary via brew install redpanda-data/tap/redpanda
Utility & Efficiency 14 / 15

Replaces fragmented kafka-topics.sh, kafka-console-consumer.sh, and Schema Registry curl scripts with one fast binary.

  • Covers brokers, topics, ACLs, groups, and Schema Registry
Maintenance & Lineage 9 / 10

First-party Redpanda Data CLI (redpanda-data/redpanda) with rapid release cadence.

  • Official Redpanda Data repository
Docs & Verifiability 8 / 10

Comprehensive CLI reference at docs.redpanda.com with detailed --format template docs.

  • Full rpk command reference at docs.redpanda.com

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Stores broker profiles and SASL/TLS settings in ~/.config/rpk/rpk.yaml, or accepts --brokers, RPK_BROKERS, and --user/--password flags.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

BSL-1.1 source-available (converts to Apache-2.0 after 4 years); free to use as a CLI client.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Redpanda CLI (rpk) Agent Rules
- Always pass `--format json` on `cluster`, `topic list`, and `group` read commands.
- ALWAYS bound `rpk topic consume` with `--num <N>` or `--offset end` so the command exits instead of hanging.
- Never run `rpk topic delete` or `rpk group delete` without explicit user confirmation.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect cluster metadata and brokers as JSON
rpk cluster info --format json

Returns structured JSON covering cluster ID, brokers, and topic summaries.

Sample bounded records from a topic without hanging
rpk topic consume orders --num 10 --format json

Reads exactly 10 messages (--num 10) as JSON and exits cleanly instead of tailing indefinitely.

Controlled Writes & Previews

Produce a single JSON event to a topic
echo '{"id":1,"status":"ok"}' | rpk topic produce orders

Publishes one newline-delimited record from stdin to the orders topic.

Strengths for Agents

  • + --format json works across cluster, topic, ACL, and consumer commands.
  • + rpk topic consume --num <N> makes message sampling deterministic and non-blocking.
  • + Works with standard Apache Kafka brokers as well as Redpanda.

Caveats & Pitfalls

  • ! Core repo uses BSL-1.1 source-available license (converts to Apache-2.0 after 4 years).
  • ! Running rpk topic consume without --num tails indefinitely and will hang an agent tool call.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI