String
A string
type argument has a value made up of an ordered sequences of characters, like “Hello” or “I’m a string”.
Example:
arguments:
- name: --search_query
type: string
default: "meaning of life"
description: The term to search for
alternatives: ["-q"]
alternatives
Type: String
/ List of String
Default: Empty
List of alternative format variations for this argument.
choices
Type: List of String
Default: Empty
Limit the amount of valid values for this argument to those set in this list. When set and a value not present in the list is provided, an error will be produced.
Example:
- name: --language
type: string
choices: ["python", "r", "javascript"]
default
Type: String
/ List of String
Default: Empty
The default value when no argument value is provided. This will not work if the required
property is enabled.
Example:
- name: --my_string
type: string
default: "The answer is 42"
description
Type: String
Default: Empty
A description of the argument. This is only used for documentation. Multiline descriptions are supported.
Example:
description: |
A (multiline) description of the purpose of this argument.
example
Type: String
/ List of String
Default: Empty
An example value for this argument. If no default
property was specified, this will be used for that purpose.
Example:
- name: --my_string
type: string
example: "Hello World"
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]
label
Type: String
Default: Empty
A clean version of the argument’s name. This is only used for documentation.
Example:
label: "My argument"
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_string
type: string
multiple: true
Here’s an example of how to use this:
my_component --my_string=Marc:Susan:Paul
multiple_sep
Type: String
Default: ;
The delimiter character for providing multiple
values. :
by default.
Examples:
- name: --my_string
type: string
multiple: true
multiple_sep: ";"
Here’s an example of how to use this:
my_component --my_string=Marc,Susan,Paul
name
Type: String
The name of the argument. Can be in the formats --foo
, -f
or foo
. The number of dashes determines how values can be passed:
--foo
is a long option, which can be passed withexecutable_name --foo=value
orexecutable_name --foo value
-f
is a short option, which can be passed withexecutable_name -f value
foo
is an argument, which can be passed withexecutable_name value
required
Type: Boolean
Default: Empty
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_string
type: string
required: true
summary
Type: String
Default: Empty
A one-sentence summary of the argument. This is only used for documentation.
Example:
summary: "This argument sets XYZ."
type
Type: String
Specifies the type of the argument.