Boolean

A boolean type argument has two possible values: true or false.

Example:

arguments:
  - name: --trim
    type: boolean
    default: true
    description: Trim whitespace from the final output
    alternatives: ["-t"]

alternatives

Type: String / List of String

Default: Empty

List of alternative format variations for this argument.

default

Type: Boolean / List of Boolean

Default: Empty

The default value when no argument value is provided. This will not work if the required property is enabled.

Example:

- name: --my_boolean
  type: boolean
  default: true

description

Type: String

Default: Empty

A description of the argument. This will be displayed with --help.

example

Type: Boolean / List of Boolean

Default: Empty

An example value for this argument. If no default property was specified, this will be used for that purpose.

Example:

- name: --my_boolean
  type: boolean
  example: true

info

Type: Json

Default: Empty

Structured information. Can be any shape: a string, vector, map or even nested map.

Example:

info:
  category: cat1
  labels: [one, two, three]

multiple

Type: Boolean

Default: False

Treat the argument value as an array. Arrays can be passed using the delimiter --foo=1:2:3 or by providing the same argument multiple times --foo 1 --foo 2. You can use a custom delimiter by using the multiple_sep property. false by default.

Examples:

- name: --my_boolean
  type: boolean
  multiple: true

Here’s an example of how to use this:

my_component --my_boolean=true:true:false

multiple_sep

Type: String

Default: :

The delimiter character for providing multiple values. : by default.

Examples:

- name: --my_boolean
  type: boolean
  multiple: true
  multiple_sep: ","

Here’s an example of how to use this:

my_component --my_boolean=true,true,false

name

Type: String

The name of the argument. Can be in the formats --trim, -t or trim. The number of dashes determines how values can be passed:

  • --trim is a long option, which can be passed with executable_name --trim
  • -t is a short option, which can be passed with executable_name -t
  • trim is an argument, which can be passed with executable_name trim

required

Type: Boolean

Default: False

Make the value for this argument required. If set to true, an error will be produced if no value was provided. false by default.

Example:

- name: --my_boolean
  type: boolean
  required: true

type

Type: String

Specifies the type of the argument.