CLI
Lenses offers a powerful CLI (command-line tool) built-in Go that utilizes the REST and WebSocket APIs of Lenses to communicate with Apache Kafka. It provides a straightforward way to perform common data engineering and site reliability engineering tasks.
Quick start
To use the CLI you must first configure the workspace:
lenses-cli configureAnd fill in the details:
? Host: https://lenseshost:9991
? Auth token or username:
? Password: ******
? Save workspace name: dataopsDevThe configuration will be stored in ~/.lenses/config.yml
Controlling the output format
The —output flag, controls the format of the output.
The value of output can be Table, YAML or JSON. By default, the results of a command are printed as a table.
Additionally, when using the –output flag with JSON, two more optional flags are available: –pretty and –query. These flags can be passed to all commands that fetch and return JSON-formatted results.
—pretty - Enable the pretty format for JSON output of commands (default false).
—query - A jmespath query expression. This allows for querying the JSON output of commands. For more details view the JMESPATH documentation.
Usage with a service account
To use the CLI with a service account for CI/CD you need to pass these options:
Last updated
Was this helpful?

