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. If you do not have permission to run PowerShell scripts, you can install the CLI with the MSI executable.
Select from the following installation options:
- Chocolatey
- PowerShell
- MSI
- 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 2.35.0
.
To install a specific version of 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:
Install the latest version using a proxy:
# Fetch the latest version using the specified proxy URL
$proxyUrl = "<proxy_URL>"
$version = [System.Text.Encoding]::UTF8.GetString(
(Invoke-WebRequest -Uri 'https://tools.veracode.com/veracode-cli/LATEST_VERSION' -Proxy $proxyUrl).Content
).Trim()
# Download the installation script using the specified proxy URL
$scriptPath = ((Invoke-WebRequest -Uri 'https://tools.veracode.com/veracode-cli/install.ps1' -Proxy $proxyUrl).Content)
# Execute the downloaded script with the version and proxy URL as arguments
Invoke-Command -ScriptBlock ([ScriptBlock]::Create($scriptPath)) `
-ArgumentList $version, $proxyUrlInstall a specific version without a proxy:
$version="<version>"
$proxyUrl=""
$scriptPath = ((New-Object Net.WebClient).DownloadString(
'https://tools.veracode.com/veracode-cli/install.ps1'
))
Invoke-Command -ScriptBlock ([ScriptBlock]::Create($scriptPath)) `
-ArgumentList $version,$proxyUrlwhere:
<version>
is the CLI version number, such as2.35.0
. For a list of available versions, see CLI updates.<proxy_URL>
is the URL for your proxy server, such ashttp://127.0.0.1:8080
. The URL must include HTTP or HTTPS.
The Microsoft Standard Installer (MSI) for the Veracode CLI is a signed installer.
To install a specific version of the CLI on Windows using the MSI installer:
-
Copy one of the following URLs:
- 64-bit:
https://tools.veracode.com/veracode-cli/veracode_v2.37.0_arm64.msi
- 32-bit:
https://tools.veracode.com/veracode-cli/veracode_v2.37.0_windows_386.msi
- 64-bit:
-
In a browser window, paste the copied URL into the address bar.
-
In the URL, change
<version>
to the CLI version you want to install. For example, to download version 2.35.0:
https://tools.veracode.com/veracode-cli/veracode_v2.35.0_arm64.msi
- To download the MSI installer to your desktop, select Enter.
- To install the CLI, double-click the MSI executable.
- To use the CLI, open a command prompt.
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.35.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.35.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 2.35.0
.
After you install the CLI, add your API credentials. You can also configure a proxy and test the installation.