Breadcrumbs

HCMS CLI global options

Each invocation requires global options such as server, user name, and password.

Mandatory (credentials)

Mandatory options - credentials in this case - can be passed in a CLI command or as environmental variables. In the latter case, you do not have to pass them in the command, it is enough that the variables exist in your current environment and their names and values are set correctly (see below); the CLI tool will pick them up automatically.

Note that there is a difference between an unset variable and an empty variable: an empty variable is treated as a valid password of zero length.

Credentials provided with the option as part of a CLI command, will have precedence over environmental variables. They also should be provided before any other options and commands.

Option

Short

Long

Environmental variable

Server RMI URL

-s

--server

HCMS_SERVER

User name

-u

--user

HCMS_USER

User password

-p

--password

HCMS_PASSWORD

Additional information on providing user password

There are four possible ways to provide user password, evaluated in this order (i.e., if the previous method is not used, the CLI moves to the next one):

  1. The command-line option: the -p/--password option in the command

  2. Environmental variable HCMS_PASSWORD

  3. macOS only: if Keychain Access or Passwords is activated for the current Mac user, the CLI will ask Keychain/Passwords for user password

  • Available only on OS X, automatically skipped on other platforms

  • Keychain Item Name is the server URL

  • You‘ll be prompted to enter your Mac password; denying access will skip this step

  1. An interactive prompt from the terminal/console: as the last resort, the user is asked for the password

  • Important prerequisite: both standard input and output are connected to a real terminal; if any of them is redirected, or the environment does not provide real terminal capabilities, the CLI displays an error message and exits with the error status 2.

Optional

Option

Short

Long

Meaning

Aromatization

-f

--force

Tells the CLI not to prompt for confirmation and continue