Frequently Asked Questions for Confluent CLI

This topic provides answers to general Confluent CLI questions.

How do I log in to the Confluent CLI?

To log in to the Confluent CLI, you can use the following command:

confluent login

Use your Confluent Cloud or Confluent Platform credentials to log in.

This will open a browser window where you can log in with your Confluent Cloud or Confluent Platform credentials.

How do I update the Confluent CLI?

As a best practice, keep the Confluent CLI updated to the latest version. As new features roll out on Confluent Cloud and newer versions of Confluent Platform, they often require an updated Confluent CLI. To update the Confluent CLI, use the following command:

confluent update

This will update the Confluent CLI to the latest version. To learn more, see confluent update.

For Confluent Platform, you must update to a compatible version of the Confluent CLI. For version compatibility help, see the Confluent CLI to Confluent Platform compatibility table.

Why do I get an error when running the confluent update command?

If you are using the CLI that is packaged with Confluent Platform, you may get the following error when running confluent update:

Error: you must enable updates to use this command

To resolve, try installing the Confluent CLI outside of the Confluent Platform package. Note that you must install a CLI version that is compatible with the Confluent Platform version. For version compatibility help, see the Confluent CLI to Confluent Platform compatibility table.

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.