Installing Fossa CLI
Download and install the FOSSA CLI on macOS, Linux, and Windows.
Using Installation script
FOSSA CLI provides an install script that downloads the latest release from GitHub Releases for your computer's architecture. You can see the source code and flags at install-latest.sh for Mac and Linux or install-latest.ps1 for Windows.
NOTE: You may need to add the downloaded executable to your $PATH. The installer script will output the installed path of the executable. You can also use -b to pick the installation directory when using install-latest.sh (see the install-latest.sh source code for details).
Linux or macOS
# Install latest versioncurl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash # Installs cli version v3.1.1 instead of latestcurl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- v3.1.1 # Installs cli version v3.1.1 instead of latest at current working directorycurl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b . v3.1.1 # Installs cli version v3.1.1 instead of latest at current working directory in debug modecurl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b . -d v3.1.1Windows
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.ps1'))Alternatively, install using Scoop:
scoop install fossaLikewise with scoop you can install a specific version of CLI:
scoop install fossa@3.2.9Installing CLI 1.x using Installation script
You can install FOSSA CLI 1.x with installation script for macOS or 64-bit Linux using:
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-v1.sh | bashAnd for windows:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fossas/fossa-cli/master/install-v1.ps1'))Note
As of now, there is no development work being done on CLI 1.x. Likewise, support for CLI 1.x is deprecated. If there is a defect with CLI 1.x, we will not make patches to CLI 1.x anymore but instead will ask you to migrate to 3.x, and make necessary patches to CLI 3.x. It is recommended that you migrate to CLI 3.x. Please read the migration guide for more details.
Installing manually with Github Releases
- To download FOSSA CLI manually using GITHUB releases, identify release of interest by going to releases
Example: https://github.com/fossas/fossa-cli/releases/tag/v3.2.17
- Identify release artifact for your system's OS and ARCH by looking at release assets
Example: https://github.com/fossas/fossa-cli/releases/download/v3.2.17/fossa_3.2.17_darwin_amd64.zip
- Identify release checksum to verify the release artifact
Example: https://github.com/fossas/fossa-cli/releases/download/v3.2.17/fossa_3.2.17_darwin_amd64.zip.sha256
- Download release artifact, and release artifact checksum
Example:
wget https://github.com/fossas/fossa-cli/releases/download/v3.2.17/fossa_3.2.17_darwin_amd64.zipwget https://github.com/fossas/fossa-cli/releases/download/v3.2.17/fossa_3.2.17_darwin_amd64.zip.sha256- Confirm sanity of the release artifact by comparing sha256 checksum
sha256sum --binary fossa_3.2.17_darwin_amd64.zipcat fossa_3.2.17_darwin_amd64.zip.sha256You can also compare output using diff:
diff <(sha256sum --binary fossa_3.2.17_darwin_amd64.zip) <(cat fossa_3.2.17_darwin_amd64.zip.sha256)- Extract and copy the binary to
$PATH
unzip fossa_3.2.17_darwin_amd64.zipmv fossa /usr/local/bin/fossa- Confirm the fossa version using
--version
fossa --version