Xygeni CLI Installation
Xygeni CLI can be used either installing it or by using Xygeni CLI Docker Image.
CLI Installation
Download the Scanner
Run the one of the following which better matches your preferences:
curl -sLO https://get.xygeni.io/latest/scanner/xygeni-release.zip iwr https://get.xygeni.io/latest/scanner/xygeni-release.zipOr go to https://get.xygeni.io and dowload it manually.
Verify the integrity of the script
Xygeni publishes a SHA-256 checksum of published components in the xygeni/xygeni GitHub repository, so you may verify the integrity of a downloaded artifact.
To ensure that the downloaded installation script checksum matches the checksum published in Xygeni repository, meaning that probably it was not tampered with:
echo "$(curl -s https://raw.githubusercontent.com/xygeni/xygeni/main/checksum/latest/xygeni-release.zip.sha256) xygeni-release.zip" | sha256sum --checkIf under macOS, as sha256sum is probably not installed in your host, you may:
read this to install it,
or use
shasum -a 256instead orsha256sumif theshasumcommand is installed,
echo "$(curl -s https://raw.githubusercontent.com/xygeni/xygeni/main/checksum/latest/xygeni-release.zip.sha256) xygeni-release.zip" | sha256 -a 256 --checkor use
opensslto compute the SHA-256 checksum of the installation script and compare it with the published checksum.
(Get-FileHash '.\xygeni-release.zip' -Algorithm SHA256).Hash -eq `
(iwr https://raw.githubusercontent.com/xygeni/xygeni/main/checksum/latest/xygeni-release.zip.sha256)Unzip the scanner
Unzip the Xygeni Scanner zip that you have just downloaded to a new folder.
unzip xygeni-release.zip -d /destination/pathOpen a Windows PowerShell cmd and use the following command:
Expand-Archive -Path "C:\path\to\xygeni-release.zip" -DestinationPath "C:\Destination\Path"Fetch your Xygeni API token
Go your profile pannel and navigate to Organization/Personal Tokens:

Create a new token. The difference betweeen Organization tokens and Personal tokens is who can see and revoke those tokens. Select either one and generate a new token.

In order to run scans, the only permission that is needed is the "Upload scan results" permission. However, if you want to use the same token with the REST API, you’ll need to grant it additional permissions.
Set XYGENI_TOKEN environment variable
In order to run scans, a new environment variable must be set, the name of this variable must be "XYGENI_TOKEN" and it content has to be the token that was created in the previous step.
nano ~/.bashrcAdd this line at the end of the file:
export XYGENI_TOKEN="<TOKEN>"Apply the changes:
source ~/.bashrcsetx XYGENI_TOKEN "<TOKEN>"(Recommended) Add the scanner folder to path
In order to execute the Xygeni application as another command, the Xygeni Scanner folder must be added to the path.
nano ~/.bashrcAdd this line at the end of the file:
export PATH="$PATH:/Path/To/Scanner"Apply the changes:
source ~/.bashrcsetx PATH "%PATH%;C:\Path\to\Scanner"What’s next?
Congratulations, at this point you should have your installation successfully completed.
Now, let’s run your first scan. Move to your installation directory and execute the command:
cd my-xygeni-installation-dir
xygeni scan -n your_project_name --dir your_project_pathLast updated