Frequently Asked Questions for Confluent CLI

This topic provides answers to general Confluent CLI questions.

How can I suggest features for the Confluent CLI?

To suggest features for the CLI, you can do either of the following:

How do I produce a message to a topic manually using the Confluent CLI?

To produce a message to a topic manually on Confluent Platform or Confluent Cloud, you can use use confluent kafka topic produce <topic-name> and confluent kafka topic consume <topic-name> as demonstrated in the confluent kafka topic produce and confluent kafka topic consume command examples.

Why am I getting an unknown flag error?

When trying to execute a command using the Confluent CLI, you may receive the following error: “Error: unknown: –flag”. If this occurs, see the following resolutions:

Resolution 1: You must upgrade to the latest CLI version

If you are operating in an earlier version of the Confluent CLI, you must upgrade to the latest version of the CLI in which the flag is supported. To upgrade to the latest version of the CLI, see Upgrade. For more help, see the Confluent CLI release notes.

Resolution 2: Some flags are platform-specific

Some flags are only supported in Confluent Platform and not in Confluent Cloud, and vice versa. For instance, the --url flag that is supported in Confluent Platform is not supported in Confluent Cloud for the confluent kafka topic create command. Ensure you review the Flags section of specific command to see if the flag is supported in cloud and/or on-premises.

How do I register a cluster in Confluent Platform?

To register a cluster in Confluent Platform, use the following command: confluent cluster register.