Install the Contrast CLI
To install the Contrast CLI:
Install Node.js. The Contrast CLI is executed as a Node.js package, so this is required. Versions 10, 12, and 14 are currently supported.
Instrument your application.
Note
It is also possible to register an application that has not yet been instrumented. However, all applications should be instrumented so that your application has a library score and the data in the library grid is populated.
Use the
cli_proxy
property in your agent configuration to establish communication with Contrast over a proxy.If authentication is required, provide the username and password with the protocol, host and port. For example:
http://username:password@<host>:<port>
Be sure the source code for target applications is available locally. Follow the requirements for your application's language.
Run the following command:
npm install -g @contrast/contrast-cli
Alternatively, you can install the CLI with Yarn with the following command:
yarn global add @contrast/contrast-cli
Note
The Contrast CLI must be installed globally.
Once the installation is complete you can register an application to begin analyzing your code.