Cohesion is distributed as a Node.js package. The main prerequisite is to have a compatible node package manager installed such as "npm" and "yarn".

Use the following command to install Cohesion globally in your environment:

$ npm install @cohesionsh/cli -g

After successful installation, type cohesion to access the available commands and options.

Alternatively, you can include Cohesion as part of your "package.json" dependencies:

$ npm install --save-dev @cohesionsh/cli

This method will place the cohesion boot script inside the local ./node_modules/.bin/ folder. The script can be referenced from the script section in your "package.json" files like so:

  "scripts": {
    "run-cohesion": "cohesion ..."

Use the following command to update to the latest version for global installs:

$ npm install @cohesionsh/cli@latest -g

For local installations do not specify the "-g" flag:

$ npm install @cohesionsh/cli@latest


Cohesion is available as a Docker image on DockerHub and it can be directly integrated into your docker build scripts and docker orchestration deployments.

Use the following command to get the latest Cohesion from Docker hub:

$ docker pull cohesionsh/cli:latest

You can fetch a specific Cohesion version. For example, version 1.0.0 (example) can be pulled with the following command:

$ docker pull cohesionsh/cli:1.0.0

Docker usage is the same:

$ docker run cohesionsh/cli scanner http://target/
Getting started