# Installing the ZLI

{% 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 %}

BastionZero's command-line interface (CLI), the Zero-Trust Command Line Interface (`zli`), is available on Mac, Linux, and Windows machines.

You can download the `zli` through package managers (`brew`, `yum`, and `apt`) or with `curl` for Windows machines.

The `zli` is compatible with both `x86` and `amd64` platforms.

{% tabs %}
{% tab title="Brew" %}

1. Install the `zli` with the command below:

   ```bash
   brew install bastionzero/tap/zli
   ```

{% hint style="info" %}
**Not seeing the update you expected to?**

You may have an outdated formula. Try a `brew update` followed by a `brew upgrade zli`.
{% endhint %}
{% endtab %}

{% tab title="Yum" %}

1. Use the `yum-config-manager` to add the BastionZero repo.

   ```bash
   sudo yum-config-manager --add-repo \
   https://download-yum.bastionzero.com/bastionzero.repo
   ```
2. Install the `zli`.

   ```bash
   sudo yum install -y zli
   ```

{% endtab %}

{% tab title="Apt" %}

1. Install the BastionZero public key from the Ubuntu key server.

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">curl -sSL "https://keyserver.ubuntu.com/pks/lookup?op=get&#x26;search=0xe5c358e613982017" | gpg --dearmor | sudo tee /usr/share/keyrings/bastionzero.gpg > /dev/null
   </code></pre>
2. Add the BastionZero repo with:

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">echo "deb [signed-by=/usr/share/keyrings/bastionzero.gpg] https://download-apt.bastionzero.com/production/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/bastionzero.list > /dev/null
   </code></pre>
3. Update the `apt` cache.

   ```bash
   sudo apt update
   ```
4. Install the `zli`.

   ```bash
   sudo apt install -y zli
   ```

{% endtab %}

{% tab title="Windows" %}

1. Download the `zli`.

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">curl.exe -LO "https://download-zli.bastionzero.com/release/latest/bin/zli.exe"
   </code></pre>
2. Append the `zli` binary folder to your `PATH` environment variable. **Note**, the following example will make the `zli` commands permanently available to the current user ***only***.

   ```bash
   setx PATH "%PATH%;<path to folder containing zli>"
   ```
3. Exit out of your terminal window and reopen a new one.
4. Log in to the `zli`.

   ```bash
   zli login
   ```

{% endtab %}
{% endtabs %}

Have feedback on the docs? Please reach out to <product@bastionzero.com>.


---

# 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.bastionzero.com/docs/deployment/installing-the-zli.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.
