> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsiam/reference-and-developer-docs/about-cortex-cli/connect-cortex-cli/manage-the-cli-after-installation.md).

# Manage the CLI after installation

Manage Cortex CLI installations and updates for security scans in Cortex XSIAM.

Manage Cortex CLI with a package manager or download script. Use either method in CI/CD pipelines or local environments.

## Package managers

### macOS and Linux

* **Upgrade to the latest version**

  ```programlisting
  brew upgrade cortexcli
  ```
* **Pin the installed version**

  ```programlisting
  brew pin cortexcli
  ```
* **Uninstall the CLI**

  ```programlisting
  brew uninstall cortexcli
  ```

### Windows

* **Upgrade to the latest version**

  ```programlisting
  scoop update cortexcli
  ```
* **Prevent upgrades**

  ```programlisting
  scoop hold cortexcli
  ```
* **Allow upgrades again**

  ```programlisting
  scoop unhold cortexcli
  ```
* **Uninstall the CLI**

  ```programlisting
  scoop uninstall cortexcli
  ```

## Automate binary downloads

Use this script for a manual installation. It downloads the latest release for your operating system and architecture. Replace your existing binary with the downloaded file. On macOS and Linux, make it executable with `chmod +x`.

```programlisting
crtx_resp=$(curl --fail "<CORTEX_API_URL>/public_api/v1/unified-cli/releases/download-link?os=<OS>&architecture=<ARCH>" \
  -H "x-xdr-auth-id: <AUTH_ID>" \
  -H "Authorization: ${CORTEX_API_KEY}") \
  && crtx_url=$(echo $crtx_resp | jq -r ".signed_url") \
  && crtx_file=$(echo $crtx_resp | jq -r ".file_name") \
  && curl -o $crtx_file $crtx_url
```

### Replace the placeholders

* `CORTEX_API_KEY`: Your API key
* `<CORTEX_API_URL>`: Your tenant API base URL
* `<AUTH_ID>`: Your API key ID value
* `<OS>`: Your operating system — `linux`, `darwin`, or `windows`
* `<ARCH>`: Your system architecture — such as `amd64` or `arm64`

For credential configuration options, see [Authenticate credentials](/cortex-xsiam/reference-and-developer-docs/about-cortex-cli/connect-cortex-cli/authenticate-credentials.md).

### How the script works

The script:

1. Requests a signed download link from Cortex Cloud for the latest release matching your OS and architecture.
2. Uses `jq` to extract the signed URL and binary filename.
3. Downloads the binary from the signed URL.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsiam/reference-and-developer-docs/about-cortex-cli/connect-cortex-cli/manage-the-cli-after-installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
