# Confluent CLI

> Manages Confluent Cloud/Platform Kafka clusters via the confluent CLI: topics, schemas, and connectors. Use when working with confluent cli, database or when the user mentions confluent cli, database.

- Skill: `opknock/confluent-cli` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/confluent-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/confluent-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/confluent-cli

---


Manages Confluent Cloud/Platform Kafka clusters via the confluent CLI: topics, schemas, and connectors.

## Agentic Workflow: Read -> Reason -> Act (confluent-cli)

You are **confluent-cli** (database/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — database context for `confluent-cli`
- Domain: Manages Confluent Cloud/Platform Kafka clusters via the confluent CLI: topics, schemas, and connectors.
- **confluent-cli**: Authenticate and manage Kafka clusters, topics, and schema registry — `confluent login --prompt`
- Check `knowledge` and `prerequisites: confluent`

### 2. Reason — think for `confluent-cli`
- For `confluent-cli`: Authenticate and manage Kafka clusters, topics, and schema registry — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `confluent-cli` tools
- Tools: `Glob`, `Grep`, `Read`, `Confluent` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `confluent-cli:13f17bd6`

# Confluent CLI

Manages Confluent Cloud (SaaS) and Confluent Platform Kafka clusters: topics,
schema registry, and cluster selection.

## When to Use

- Managing Confluent Cloud environments
- Creating topics and testing produce/consume
- Registering and checking Avro/JSON schemas

## Real Commands

```bash
# Login
sudo confluent login --prompt
sudo confluent environment list
sudo confluent environment use env-abc123

# Clusters
sudo confluent kafka cluster list
sudo confluent kafka cluster use lkc-xxxxx

# Topics
sudo confluent kafka topic create orders --partitions 6
sudo confluent kafka topic list
sudo confluent kafka topic describe orders

# Produce/consume
sudo confluent kafka topic produce orders --parse-key --delimiter :
sudo confluent kafka topic consume orders --from-beginning --max-messages 10

# Schema Registry
sudo confluent schema-registry schema create --subject orders-value --schema orders.avsc --type AVRO
sudo confluent schema-registry schema list --subject orders-value
```

## Avro Schema Example

```json
{"type": "record", "name": "Order", "fields": [{"name": "order_id", "type": "string"}, {"name": "amount", "type": "double"}]}
```

## Best Practices

- Use dedicated service accounts + API keys in CI, never personal login
- Register schemas before producing data
- Keep Avro schemas backward compatible
- Use `--max-messages` in tests to avoid endless consume
- Scope permissions per environment

## Example Response

Creates the cluster resource, registers the schema, and verifies the end-to-end
produce/consume roundtrip with the CLI.

## Capabilities

### confluent-cli
Authenticate and manage Kafka clusters, topics, and schema registry

**Parameters:**
- `partitions` (integer): Partition count for topic creation
- `from-beginning` (boolean): Consume from the earliest offset
- `schema` (string): Schema file path for schema create

**Commands:**
- `confluent login --prompt`
- `confluent kafka cluster list`
- `confluent kafka cluster use lkc-xxxxx`
- `confluent kafka topic create orders --partitions 6`
- `confluent kafka topic consume orders --from-beginning --max-messages 10`

**Examples:**
- confluent kafka topic list
- confluent kafka topic produce orders --parse-key --delimiter :
- confluent schema-registry schema create --subject orders-value --schema orders.avsc

## References
- [Confluent CLI docs](https://docs.confluent.io/confluent-cli/)
- [Schema Registry docs](https://docs.confluent.io/cloud/current/sr/)

