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
| Type | What it does |
|---|---|
Text | Free text input (this is the default) |
Enum | Pick one (or many, with multi: true) from a list |
Number | Numeric input |
Boolean | Yes/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: 3Selecting 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
| Field | Required | Description |
|---|---|---|
name | Yes | Variable name used in {{placeholders}} |
description | Yes | Prompt text shown to the user |
arg_type | No | Text, Enum, Number, or Boolean |
default_value | No | Pre-filled value for text/number inputs, or initial selection for booleans (true/false/yes/no/1/0) |
enum_variants | No | Hardcoded list of options |
enum_command | No | Shell command that outputs options (one per line) |
dynamic_resolution | No | Name of another argument to resolve first |
multi | No | When true on an Enum, lets the user pick multiple values (joined with ,) |
min_selections | No | Minimum picks for Enum with multi: true |
max_selections | No | Maximum picks for Enum with multi: true |