# CLI

{% hint style="danger" %}
The Lenses 5.x CLI is incompatible with Lenses 6.1
{% endhint %}

A new CLI for HQ is available [here](https://archive.lenses.io/lenses/6.1/). To view the available commands run

{% code title="terminal" %}

```sh
docker run -it lensesio/lenses-cli:6.1 --help

Command line interface to the Lenses HQ HTTP API.

Usage:
  lenses [command]

Available Commands:
  agent            Command line interface to the agent.
  api              API meta information.
  completion       Generate the autocompletion script for the specified shell
  config           Manage CLI configuration.
  environments     Manage Environments.
  groups           Manage Groups.
  help             Help about any command
  misc             Miscellaneous commands.
  roles            Manage Roles.
  service-accounts Manage ServiceAccounts.
  users            Manage Users.
  utils            Bundles utility commands.
  version          Display's the cli's version

Flags:
  -a, --address string      URL to the HQ HTTP api.
  -c, --context string      Config context.
  -h, --help                help for hq
  -k, --insecure            Insecure. Disables TLS verification.
  -p, --password string     Password.
  -s, --session-id string   Session ID (cookie auth).
  -t, --token string        Auth (bearer) token of a service account.
  -u, --username string     Username.
  -v, --verbose             Verbose; log to stderr.
  -w, --verboser            Verboser; log raw http traffic to stderr.

Use "lenses [command] --help" for more information about a command.
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/resources/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
