Skip to content

Latest commit

 

History

History
110 lines (71 loc) · 4.23 KB

installing-fossa-cli.md

File metadata and controls

110 lines (71 loc) · 4.23 KB

Installing Fossa CLI

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 version
curl -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 latest
curl -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 directory
curl -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 mode
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b . -d v3.1.1

Windows

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 fossa

Likewise with scoop you can install a specific version of CLI:

scoop install fossa@3.2.9

Installing 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 | bash

And 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'))

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

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

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

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

  1. 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.zip
wget https://github.com/fossas/fossa-cli/releases/download/v3.2.17/fossa_3.2.17_darwin_amd64.zip.sha256
  1. Confirm sanity of the release artifact by comparing sha256 checksum
sha256sum --binary fossa_3.2.17_darwin_amd64.zip
cat fossa_3.2.17_darwin_amd64.zip.sha256

You 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)
  1. Extract and copy the binary to $PATH
unzip fossa_3.2.17_darwin_amd64.zip
mv fossa /usr/local/bin/fossa
  1. Confirm the fossa version using --version
fossa --version