Skip to content

Escape CLI

If you want to automate your Escape scans, you can use the Escape CLI.

The Escape CLI is a wrapper around the Escape REST API.

Installation

You can install the Escape CLI by downloading the binary from the Escape CLI GitHub Releases.

You can also install it using the following command:

Unix-based Systems (Linux, macOS)

curl -sf https://raw.githubusercontent.com/Escape-Technologies/cli/refs/heads/main/scripts/install.sh | sudo bash

Windows

powershell -c "irm https://raw.githubusercontent.com/Escape-Technologies/cli/refs/heads/main/scripts/install.ps1 | iex"

To check if the CLI is installed, you can run the following command:

escape-cli version

Configuration

To be able to run CLI commands against your Escape instance, you need to add the following environment variable : ESCAPE_API_KEY. To get this variable, go to your users settings page.

You can then set the ESCAPE_API_KEY environment variable in your .zshrc, .bashrc or in your CI/CD pipeline.

Optional Environment Variables

  • ESCAPE_K8S_INTEGRATION: Controls Kubernetes integration. Set to true (default) to enable or false to disable Kubernetes integration.

Usage

You can view the list of commands available with the CLI by running the following command:

escape-cli help

Example

For example, to list all your locations, you can run the following command:

escape-cli locations list

You can also use the --output option to output the result in a different format.

escape-cli locations list --output json

You can get more specific help about a command by adding the command name:

escape-cli help scans start