Alternate CLI installation methods
Install the latest version of the CLI. Veracode strongly recommends that you always install the latest version of the CLI. If you need to install a specific version or configure certain options, use the following commands.
Ensure you meet the prerequisites.
To avoid conflicts on Windows, use either Chocolatey or PowerShell, but not both.
Select from the following installation options:
- Chocolatey
- PowerShell
- Homebrew
- cURL
Install the CLI on Windows using Chocolatey.
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 install the CLI and, optionally, configure a proxy server on Windows using a PowerShell script:
-
Run PowerShell as an administrator.
-
To configure PowerShell to run signed scripts, run:
Set-ExecutionPolicy AllSigned -Scope Process -Force
-
To install the CLI, run:
$scriptPath = ((new-object net.webclient).DownloadString('https://tools.veracode.com/veracode-cli/install.ps1')); Invoke-Command -ScriptBlock ([scriptblock]::Create($scriptPath)) -ArgumentList <version>,<proxy_URL>"
where:
-
<version>
is the CLI version number, such as2.7.2
. -
<proxy_URL>
is the URL for your proxy server.
-
-
Optionally, if you are installing the CLI in an automation, such as a CI/CD system, declare the variables, then apply them:
a. Declare one or both of the following variables:
$version="<version>"
$proxyUrl="<proxy_URL>"b. To install the CLI and apply the variables, run:
$scriptPath = ((new-object net.webclient).DownloadString('https://tools.veracode.com/veracode-cli/install.ps1')); Invoke-Command -ScriptBlock ([scriptblock]::Create($scriptPath)) -ArgumentList $version,$proxyUrl"
To install a specific version of the CLI on macOS or Linux using Homebrew, run:
brew install veracode-cli@<version>
where, <version>
is the CLI version number, such as 2.32.0
. The version must be no more than four versions older than the latest version.
If you install multiple versions of the CLI, use the link
and unlink
commands to switch between versions.
To unlink Homebrew from the latest version of the CLI, run:
brew unlink veracode-cli
To link Homebrew to a specific version of the CLI, run:
brew link veracode-cli@<version>
where, <version>
is the CLI version number, such as 2.32.0
.
To install a specific version of the CLI on macOS or Linux, run:
curl -fsS https://tools.veracode.com/veracode-cli/install | VERACODE_CLI_VERSION=<version> sh
where, <version>
is the CLI version number, such as 1.10.1
.
After you install the CLI, add your API credentials. You can also configure a proxy and test the installation.