Workflow Structure
How to define workflow YAML files
Workflows are YAML files that define a parameterized command. You write the template once, and wf handles the rest.
Minimal Workflow
Every workflow needs three things: a name, a description, and a command.
name: "List Files"
description: "List files in a directory"
command: "ls -la {{path}}"
arguments:
- name: path
description: "Directory path"
default_value: "."File Location
Drop .yaml or .yml files in your workflows directory:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/workflow/workflows/ |
| Linux | ~/.config/workflow/workflows/ |
| Windows | %APPDATA%/workflow/workflows/ |
Or use wf sync to pull workflows from a Git repository.
All Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Display name in the interactive menu |
description | Yes | What the workflow does |
command | Yes | Command template with {{placeholder}} variables |
arguments | No | Interactive prompts to resolve before running |
tags | No | Tags for organization and filtering |
shells | No | Which shells this workflow targets |
source_url | No | Link to original source |
author | No | Who wrote this workflow |
author_url | No | Link to the author |
Template Syntax
Commands use {{variable_name}} placeholders that get replaced with user input. You can use a variable multiple times:
command: "docker build -t {{image}}:{{tag}} . && docker push {{image}}:{{tag}}"Under the hood, this uses Tera templates.