wf

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:

OSPath
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

FieldRequiredDescription
nameYesDisplay name in the interactive menu
descriptionYesWhat the workflow does
commandYesCommand template with {{placeholder}} variables
argumentsNoInteractive prompts to resolve before running
tagsNoTags for organization and filtering
shellsNoWhich shells this workflow targets
source_urlNoLink to original source
authorNoWho wrote this workflow
author_urlNoLink 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.

What's Next?

On this page