Synopsis

fcli tool bugtracker-utility install [-y] [--[no-]global-bin] [--on-digest-mismatch=<onDigestMismatch>] [-p=<platform>] [--progress=<type>] [-v=<version>] [-u=<versionsToUninstall>[, <versionsToUninstall>…​]]…​ [[-h] [--env-prefix=<prefix>] [--log-file=<logFile>] [--log-level=<logLevel>] [--log-mask=<level>] [--debug]] [-d=<installDir> | -b=<baseDir>] [[-o=<type+args>] [--style*=<style>,…​]…​ ] [--to-file=<outputFile>_]]

Description

This command allows for tool installation and upgrade. By default, tools are installed to <base-dir>/<tool-name>/<version>. The base directory can be specified using the --base-dir option, defaulting to <user.home>/fortify/tools if not specified. Unless the --no-global-bin option is specified, wrapper scripts for invoking each tool will be installed to <base-dir>/bin, allowing users to add this single directory to the system PATH for easy invocation of all installed tools.

It is also possibly to specify an explicit installation directory through the --install-dir option, for example to install the tool to a specific location that will be cached by a CI/CD system. The --install-dir option doesn’t create the <base-dir>/<tool-name>/<version> directory structure, and doesn’t install wrapper scripts to a shared bin-directory.

When installing a new version, older versions can optionally be automatically un-installed using the --uninstall option, which is basically the equivalent of a tool upgrade. When trying to install a version that’s already been installed, only some post-installation tasks will be re-run, like installing the global bin scripts and performing any tool configuration if applicable.

Sample invocations:

Install latest tool version, keep older versions: fcli tool <name> install -v latest

Install latest tool version (only re-running post-install if already existing), uninstall all other tool versions: fcli tool <name> install -v latest --uninstall all

Install latest v2 version, uninstall all other v2 versions: fcli tool <name> install -v 2 --uninstall 2

Install latest and latest v1, have global bin-scripts point to latest: fcli tool <name> install -v latest fcli tool <name> install -v 1 --no-global-bin

Each tool installation includes shell scripts or executables that can be run as usual, however tools installed through the 'fcli tool <tool-name> install' command can also be run through the 'fcli tool <tool-name> run' command. This command allows for selecting which version of a tool to run if multiple versions have been installed, and allows for easy tool invocation even if they haven’t been added to the PATH.

Options

-b, --base-dir=<baseDir>

Base directory under which the tool will be installed.

-d, --install-dir=<installDir>

Tool installation directory. As described above, it is recommended to use --base-dir instead.

--[no-]global-bin

By default, wrapper scripts will be installed to <base-dir>/bin; use --no-global-bin to skip installing/updating these wrapper scripts.

--on-digest-mismatch=<onDigestMismatch>

Action to take if there is a digest mismatch. Allowed values: fail, warn. Default action is to fail.

-p, --platform=<platform>

By default, fcli will try to install tool binaries that match the current operating system & architecture. Use this option to override automatic platform detection. The list-platforms command lists available platforms.

--progress=<type>

Configure progress output. Allowed values: auto, none, simple, stderr, single-line, ansi. Default value: auto. Proper output of single-line and ansi depends on console capabilities.

-u, --uninstall=<versionsToUninstall>[,<versionsToUninstall>…​]

Uninstall the given versions while installing the new version. Accepts 'all' to uninstall all existing versions, or a comma-separated list of version numbers. Version numbers may be specified as <major>[.<minor>[.<patch>]].

-v, --version=<version>

Tool version to install; see output of list command to view available versions. Default value: latest

-y, --confirm

Automatically confirm all prompts (cleaning the target directory, uninstalling other versions).

-o, --output=<type+args>

Select output type (csv, table, expr, json, xml, yaml) and optional type arguments.

--store=<var>[:<prop>]

Store JSON results in an fcli variable for later reference.

*--style*=<style>,…​

Select output style: header, no-header, pretty, no-pretty, flat, no-flat, array, single, border, no-border, md-border.

--to-file=<outputFile>

Write output to the specified file.

--debug

Enable collection of debug logs.

--env-prefix=<prefix>

Prefix for resolving default option values. Default value: FCLI_DEFAULT.

-h, --help

Use 'fcli [command] -h' to display help for fcli (sub-)commands.

--log-file=<logFile>

Write log output to file. Default: ./fcli.log if logging is enabled.

--log-level=<logLevel>

Set logging level: TRACE, DEBUG, INFO, WARN, ERROR, NONE.

--log-mask=<level>

Log mask level: high, medium, low, none. Default: medium. Masking is done on a best-effort basis; no guarantee that all sensitive data will be masked.