> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/sast-and-sca/ocular/install.md).

# Install

Ocular is installed via the Qwiet CLI. Follow these steps to get started:

### Step 1: Install the Qwiet CLI <a href="#step-1-install-the-qwiet-cli" id="step-1-install-the-qwiet-cli"></a>

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

```
curl https://cdn.shiftleft.io/download/sl >/usr/local/bin/sl && chmod a+rx /usr/local/bin/sl
```

![](/files/CRrxFX9wuboXxDrdB2dv)

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)
{% endtab %}

{% tab title="macOS" %}

```
curl https://cdn.shiftleft.io/download/sl >/usr/local/bin/sl && chmod a+rx /usr/local/bin/sl
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)
{% endtab %}

{% tab title="Windows" %}

```
Invoke-WebRequest -Uri 'https://cdn.shiftleft.io/download/sl-latest-windows-x64.zip' -OutFile sl-latest-windows-x64.zip
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)
{% endtab %}
{% endtabs %}

### Step 2: Authenticate with your Qwiet account <a href="#step-2-authenticate-with-your-qwiet-account" id="step-2-authenticate-with-your-qwiet-account"></a>

Create an environment variable called `SHIFTLEFT_ACCESS_TOKEN` and set its value to your access token (your access token is available in the [Dashboard](https://app.shiftleft.io/user/profile)).

Alternatively, you can run the following, which will also create a configuration file located at `.shiftleft\config.json`:

```
sl auth --org "${ORGANISATION_ID}" --token "${ACCESS_TOKEN}"
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)

### Step 3: Download Ocular <a href="#step-3-download-ocular" id="step-3-download-ocular"></a>

```
sl ocular
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)

### Step 4: Run Ocular <a href="#step-4-run-ocular" id="step-4-run-ocular"></a>

Use the same Qwiet CLI command to run Ocular:

```
sl ocular
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)

![](/files/mlZo7QhbBaWAQlpvEVi9)note

Ocular requires Java Runtime Environment 8 (or later) to run.

If your default java is JDK8 (check with `java -version`) *and* you want to scan C code, you need to have an environment variable `JAVA_11_HOME` that points to a JDK11. Otherwise, you need to have an environment variable `JAVA_8_HOME` that points to a JDK8. In doubt, just use ocular and follow the instructions in the error messages.

Background: some components (specifically `java2cpg`) require Java 8 (exactly, not higher), while others (specifically `c2cpg`) require Java >= 9.
