Bash SDK: prompts

Supported methods

The following Prompts are supported by the Bash SDK:

  • checkbox
  • confirm
  • datetime
  • editor
  • input
  • list
  • number
  • password
  • secret

Note: Every prompt has -f/ --flag options that can be used to set the corresponding daemon command line flag accordingly.

Checkbox

Checkbox presents a list of options to the user, who can select multiple items in the interface (i.e. terminal or slack).

USAGE:

ARGS:

OPTIONS:

Example:

Output:

Confirm

Confirm presents a yes/no question to the user in the interface (i.e. terminal or slack).

USAGE:

FLAGS:

OPTIONS:

Example:

Output:

Datetime

Datetime presents a date picker to the user that allows them to select a date and/or time in the interface. (i.e. terminal or slack).

USAGE:

FLAGS:

OPTIONS:

Example:

Output:

Editor

Editor presets a prompt requesting a multi-line response from the user. If used in a terminal interface, the nano editor will be presented.

USAGE:

OPTIONS:

Example:

Output:

Input

Input presents an input (single-line text) prompt in the interface (i.e. terminal or slack).

The method returns the user’s response as string.

USAGE:

FLAGS:

OPTIONS:

Example:

Output:

List

List presents a list of options to the user to select one item from in the interface (i.e. terminal or Slack).

USAGE:

ARGS:

OPTIONS:

Example:

Output:

Number

Number presents a prompt for a numeric value in the interface (i.e. terminal or Slack).

USAGE:

OPTIONS:

Example:

Output:

Password

Password presents an input prompt for passwords in the interface (i.e. terminal or Slack).

The password can be entered by the user or selected from their team’s secret store. If the value is entered directly, it will be obscured on the screen.

For passwords, the name doubles as the default secret store key for the desired secret. If this key is present, it will be selected as the default option for the user.

The method returns the user’s response as string.

USAGE:

FLAGS:

OPTIONS:

Example:

Output:

Secret

Secret presents an input prompt for secrets in the interface (i.e. terminal or Slack).

The secret can be entered by the user or selected from their team’s secret store. The value will be displayed on the terminal/screen as it is entered for verification.

For secrets, the name doubles as the default secret store key for the desired secret. If this key is present, it will be selected as the default option for the user.

The method returns the user’s response as string.

USAGE:

OPTIONS:

Example:

Output: