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 (or many, with multi: true) 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.


Multi-select Enums

Set multi: true on an Enum argument to let the user pick multiple values. Selections get joined with , and substituted as a single string.

- name: services
  arg_type: Enum
  multi: true
  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. Both enum_variants and enum_command work with multi: true.


All Argument Fields

FieldRequiredDescription
nameYesVariable name used in {{placeholders}}
descriptionYesPrompt text shown to the user
arg_typeNoText, Enum, Number, or Boolean
default_valueNoPre-filled value for text/number inputs, or initial selection for booleans (true/false/yes/no/1/0)
enum_variantsNoHardcoded list of options
enum_commandNoShell command that outputs options (one per line)
dynamic_resolutionNoName of another argument to resolve first
multiNoWhen true on an Enum, lets the user pick multiple values (joined with ,)
min_selectionsNoMinimum picks for Enum with multi: true
max_selectionsNoMaximum picks for Enum with multi: true

On this page