Skip to main content

Install the Contrast CLI

To install the Contrast CLI:

  1. 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.

  2. 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.

  3. 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>
  4. Be sure the source code for target applications is available locally. Follow the requirements for your application's language.

  5. 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.

  6. Once the installation is complete you can register an application to begin analyzing your code.