# ZLI Cheat Sheet

{% hint style="danger" %}

### <mark style="color:red;">**The BastionZero product is maintained for existing BastionZero customers only.**</mark>&#x20;

Moving forward, we are natively rebuilding BastionZero’s technology as Cloudflare’s [Access for Infrastructure](https://developers.cloudflare.com/cloudflare-one/applications/non-http/infrastructure-apps/) service.
{% endhint %}

The below are commonly used commands from the `zli`. For full details on all the `zli` commands, see the [ZLI Reference Manual](https://docs.bastionzero.com/docs/zli-reference-manual) or execute `zli --help` from your terminal.

| Action                                        | ZLI Command                                                                             |
| --------------------------------------------- | --------------------------------------------------------------------------------------- |
| Log in to BastionZero                         | `zli login`                                                                             |
| Log out of BastionZero                        | `zli logout`                                                                            |
| Connect to your target                        | `zli connect {user@target-name}`                                                        |
| Send zli and daemon logs to BastionZero       | `zli send-logs`                                                                         |
| Send kube or bzero target logs to BastionZero | `zli send-logs -t {target-name/id}`                                                     |
| Set the log level on an agent to be trace     | `zli agent configure {agent-name/id} loglevel trace`                                    |
| Use kubectl with BastionZero                  | `zli kube -- {your kubectl command}`                                                    |
| List targets                                  | `zli list-targets` or `zli lt`                                                          |
| List targets with full detail                 | `zli list-targets --detail` or `zli lt -d`                                              |
| List targets with target IDs                  | `zli list-targets --showId` or `zli lt -i`                                              |
| List targets of a specific type               | `zli lt -t {target-type}`, use `zli lt -t --help` for additional details                |
| List connections                              | `zli list-connections` or `zli lc`                                                      |
| List policies                                 | `zli policy list`                                                                       |
| List policies of a specific type              | `zli policy list -t {policy-type}`, use `zli policy list --help` for additional details |
| List the organization's BastionZero users     | `zli policy users`                                                                      |
| List the organization's SSO groups            | `zli policy groups`                                                                     |
| Check if you have active daemons running      | `zli status`                                                                            |
| Disconnect from all active daemons            | `zli disconnect`                                                                        |
| Disconnect from daemon of specific type       | `zli disconnect {type}`, use `zli disconnect --help` for additional details             |
