# Argument

Specify positional arguments (required or optional) used by your script.

The argument's value will be available to you as ${args[name]} in your bash function.

  - name: user
    help: AWS Username.
    required: true

  - name: role
    help: User role.
    default: admin
      - admin
      - guest

  - name: key
    help: Path to SSH key.
    validate: file_exists

# Basic Options

# name

String Required

The name of the argument. Use lowercase letters, since it serves multiple purposes:

  • It will be capitalized in the help text.
  • It will be used as the hash key in the ${args[...]} associative bash array.

# help


The message to display when using --help. Can have multiple lines.

# Common Options

# default


The value to use in case it is not provided by the user. Implies that this argument is optional.

Default Values Example

# required


Specify that this argument is required.

# Advanced Options

# allowed

Array of Strings

Limit the allowed values to a specified whitelist. Can be used in conjunction with default or required.

Whitelist Example

# repeatable


Specify that this argument can be provided multiple times.

The received value will be formatted as a quoted, space-delimited string which you will need to convert to array with something like eval "data=(${args[path]})".

Repeatable Argument Example

# validate


Apply a custom validation function.

Custom Validations