Task Engine

Hof’s Task Engine is a CUE powered DAG processor. Define tasks and flows in CUE to process data, implement webhooks, or connect APIs. Use the library of builtin tasks and connectors or create custom tasks using any container. Hof will infer dependencies and run tasks as they are ready or needed.



@flow(): useful for a single, unnamed workflow

@flow(<name>): write and call one or more flows by name

@task(<pkg.Func>): a workflow step of type <pkg.Func>

@print(<cue.path>): output values to log for debugging

Command Help

hof flow -h

hof flow -h

run workflows and tasks powered by CUE

  hof flow [cue files...] [@flow/name...] [+key=value] [flags]
  hof flow [command]

  flow, f

Available Commands:
  list        print available flows

  -B, --bulk string        exprs for inputs to run workflow in bulk mode
  -F, --flow stringArray   flow labels to match and run
  -h, --help               help for flow
  -P, --parallel int       global flow parallelism (default 1)
      --progress           print task progress as it happens

Global Flags:
  -E, --all-errors               print all available errors
  -i, --ignore-errors            turn off output and assume defaults at prompts
  -D, --include-data             auto include all data files found with cue files
  -V, --inject-env               inject all ENV VARs as default tag vars
  -I, --input stringArray        extra data to unify into the root value
  -p, --package string           the Cue package context to use during execution
  -l, --path stringArray         CUE expression for single path component when placing data files
  -q, --quiet                    turn off output and assume defaults at prompts
  -d, --schema stringArray       expression to select schema to apply to data files
      --stats                    print generator statistics
  -0, --stdin-empty              A flag that ensure stdin is zero and does not block
  -t, --tags stringArray         @tags() to be injected into CUE code
  -U, --user-files stringArray   file globs to embed into the root value (<cue-path>=<file-glob>), use % as slash to trim before
  -v, --verbosity int            set the verbosity of output
      --with-context             add extra context for data files, usable in the -l/path flag

Use "hof flow [command] --help" for more information about a command.

args & flags

hof/flow accepts CUE entrypoints like the other commands. There is CLI sugar for

  • flows: @path/name is sugar for -F path/name
  • tags: +key=value is sugar for -t key=value

Useful Flags:

  • -F/@ is used to select a flow by name in @flow(<name>)
  • -t/+ is used to inject strings into tags @tag(<name>)
  • --progress will print task progress for the events found, pre, & post