wf

Arguments

Argument types and dynamic resolution

Arguments define the interactive prompts users see when running a workflow.

Argument Types

TypeDescription
TextFree text input (default)
EnumSelect one from a list
MultiEnumSelect multiple from a list (joined with ,)
NumberNumeric input
BooleanTrue/false

Text Arguments

The default type. Just a text prompt with an optional default value.

arguments:
  - name: image_name
    description: "Docker image name"
    default_value: "my-app"

Enum Arguments

Pick one from a list. You can define variants statically or generate them dynamically.

Static Variants

arguments:
  - name: env
    arg_type: Enum
    description: "Target environment"
    enum_variants:
      - "dev"
      - "staging"
      - "production"

Dynamic Variants (Shell Command)

Enum options generated at runtime from a shell command:

arguments:
  - name: namespace
    arg_type: Enum
    description: "Kubernetes namespace"
    enum_command: "kubectl get namespaces --no-headers | awk '{print $1}'"

Dynamic Resolution (Chained Arguments)

An argument can depend on a previously resolved argument. The dynamic_resolution field tells wf to resolve the referenced argument first, then substitute its value into enum_command.

arguments:
  - name: namespace
    arg_type: Enum
    description: "Kubernetes namespace"
    enum_command: "kubectl get namespaces --no-headers | awk '{print $1}'"

  - name: pod
    arg_type: Enum
    description: "Pod to inspect"
    enum_command: "kubectl get pods -n {{namespace}} --no-headers | awk '{print $1}'"
    dynamic_resolution: "namespace"

This is genuinely useful. We promise not every feature is over-the-top.

MultiEnum Arguments

Select multiple items from a list. Selected values are joined with , and substituted as a single string.

arguments:
  - name: services
    arg_type: MultiEnum
    description: "Services to deploy"
    enum_variants:
      - "api"
      - "web"
      - "worker"
      - "scheduler"
    min_selections: 1
    max_selections: 3

This resolves to something like api,web,worker in the command template.

Argument Fields

FieldRequiredDescription
nameYesVariable name used in the command template
descriptionYesPrompt text shown to the user
arg_typeNoText (default), Enum, Number, Boolean
default_valueNoPre-filled value for text inputs
enum_variantsNoStatic list of options for Enum type
enum_commandNoShell command that outputs options (one per line)
dynamic_resolutionNoName of another argument to resolve first
min_selectionsNoMinimum selections required for MultiEnum
max_selectionsNoMaximum selections allowed for MultiEnum

On this page