Skip to main content

Getting started with the CLI

This guide explains how to install or upgrade the Veracode CLI, add your API credentials, and run a test to ensure the CLI is set up correctly.


Before you can install and use the Veracode CLI, you must have:

  • One of the following operating systems:

    • macOS (Intel, M1 or M2)
    • Linux (Intel)
    • Windows
  • A Veracode account with API credentials.

Install or upgrade the CLI

To avoid conflicts on Windows, use either Chocolatey or PowerShell, but not both.

Select from the following installation options:

Install the CLI on Windows using Chocolatey.

To install the latest version, run:

choco install veracode-cli

To install a specific version, run:

choco install veracode-cli --version=<version>

where, <version> is the CLI version number, such as 1.10.1.

To uninstall the CLI on Windows, see Uninstall the CLI.

Add your credentials

You typically store your API credentials with the CLI on your local system, but you can also configure your credentials as environment variables. For local development environments, Veracode recommends that you store your credentials with the CLI.

Store credentials with the CLI

Veracode recommends you use this option when running the CLI locally.

  1. To configure the CLI, run:

    veracode configure
  2. Enter your API ID and secret key. If you have set your credentials as environment variables, the CLI pre-populates these fields.

Configure credentials as environment variables

Veracode recommends you use this option when integrating the CLI with CI\CD systems.

To set the VERACODE_API_KEY_ID and VERACODE_API_KEY_SECRET environment variables to your API credentials, run:


Configure proxy settings

If you use the CLI behind a proxy, provide the proxy settings as environment variables.

To configure environment variables for your proxy servers, run:

set HTTP_PROXY=<URL of your HTTP proxy server>
set HTTPS_PROXY=<URL of your HTTPS proxy server>

Test the installation

To run a test scan and confirm that you have successfully installed the CLI, run:

veracode scan --source alpine:latest --type image

Next steps