awesome cli.

Queues & realtime

Confluent CLI for coding agents

Confluent environments, Kafka clusters, topics, consumers, connectors, schemas, Flink, API keys, audit settings, and JSON or YAML output.

Command: confluent

Open the official project ↗

This article follows the official documentation. We haven’t tested this tool for a hands-on review.

A coding agent can inspect Kafka resources in Confluent by running commands with the Confluent CLI, a command-line tool that sends requests to Confluent services. Kafka topics are named streams where producers write records and consumers read them. The CLI also provides commands to manage clusters, schemas, connectors, and environments in Confluent Cloud or Confluent Platform.

For a first task, ask the agent to list topics in a specified cluster and return their names. This task only reads data. The commands below follow Confluent’s documentation and have not been run for this article. They use the confluent executable and request JSON output so an agent can parse the results.

Install and sign in

Install the CLI by choosing your operating system’s instructions on Confluent’s official installation page. Then check the available commands with:

confluent --help

The CLI supports Confluent Cloud and Confluent Platform. Sign in with the documented login command and complete its prompts before giving an agent shell access:

confluent login

Confluent’s CLI FAQ describes logging in with Confluent credentials. Keep passwords, API keys, and other secrets out of agent prompts. Sign in through the CLI, then let the agent run commands using that sign-in on your machine.

List topics in a cluster

The CLI’s command structure covers environments, Kafka clusters, and topics. An environment groups Confluent resources, and a cluster is a Kafka service instance that stores topics. Use the following sequence to find a cluster and inspect its topics:

confluent environment list --output json
confluent kafka cluster list --environment <ENVIRONMENT_ID> --output json
confluent kafka topic list --cluster <CLUSTER_ID> --output json

Replace <ENVIRONMENT_ID> with an ID from the first command, then replace <CLUSTER_ID> with an ID from the second. These angle-bracket values are placeholders, not literal arguments. The CLI command reference documents JSON and YAML output. JSON gives the agent structured data to inspect, unlike terminal-formatted output.

The list commands query Confluent over the network. They do not create, delete, or alter topics. You install the CLI and check its help on your machine. The CLI must connect to the target Confluent service when you sign in or list resources.

A practical prompt for this task is:

Use the Confluent CLI to list the topics in environment <ENVIRONMENT_ID> and cluster <CLUSTER_ID>. Run read-only commands only. Return the topic names and report any command error without changing resources.

Keep the target platform in view

Confluent CLI commands and flags can differ between Confluent Cloud and Confluent Platform. For example, the FAQ notes that --url is supported for confluent kafka topic create on Confluent Platform but not for that command on Confluent Cloud. An agent should follow the command reference for the configured target rather than carry flags over from another environment.

The CLI also has write operations that create or delete resources. For an inspection request such as listing topics, keep the agent’s task limited to list commands. Before letting the agent make a change, check the command’s documentation for a validation or preview option. Do not assume every command supports a dry-run mode.

The command reference lists other resources the CLI can manage. Developers comparing shell-based tools for agent work can also browse Awesome CLI.

Tool details come from awesome-ai-cli.