wf

Arguments

Interactive prompts — from simple text to chained dynamic lists

Arguments are the interactive prompts users fill in when running a workflow. They go from simple to powerful.

Types at a Glance

TypeWhat it does
TextFree text input (this is the default)
EnumPick one from a list
MultiEnumPick multiple from a list
NumberNumeric input
BooleanYes/no toggle

Text

The simplest type. Just a prompt with an optional default.

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

Enum

Pick one option from a list. Options can be hardcoded or generated at runtime.

Hardcoded options

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

Dynamic options from a shell command

The command runs when the prompt appears. Each line of output becomes an option.

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

Chained arguments (dynamic resolution)

An argument can depend on a previous one. wf resolves the dependency first, then substitutes its value into enum_command.

- name: namespace
  arg_type: Enum
  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"

Pick a namespace → the pod list updates to show only pods in that namespace.


MultiEnum

Select multiple items. Values get joined with , and substituted as a single string.

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

Selecting api, web, and worker resolves to api,web,worker in the command.


All Argument Fields

FieldRequiredDescription
nameYesVariable name used in {{placeholders}}
descriptionYesPrompt text shown to the user
arg_typeNoText, Enum, MultiEnum, Number, or Boolean
default_valueNoPre-filled value for text inputs
enum_variantsNoHardcoded list of options
enum_commandNoShell command that outputs options (one per line)
dynamic_resolutionNoName of another argument to resolve first
min_selectionsNoMinimum picks for MultiEnum
max_selectionsNoMaximum picks for MultiEnum

On this page