Skip to content

Guide ​

Basics ​

What a task is, how to run one, and how its commands run.

  • Tasks: what a task is, the kinds of step, helper tasks and naming.
  • Running tasks: running by name, the menu, passing variables and --file.
  • Running commands: text and list commands, other directories, hiding output and background jobs.

Values ​

What a value is, and how to use one.

  • Variables: set:, const:, vars:, env files and precedence.
  • Templates: {{ }}, filters and bare references.
  • Structured data: arrays and objects, accessors and spreading.
  • Secrets: mask a value wherever hobnob prints it.

Getting values ​

Three ways a step produces a value: from a command, from another task, or from the user.

Control flow ​

Deciding which steps run, how often, and what happens when one fails.

  • Conditions: skip a task or a step with if:.
  • Loops: run steps once per item, entry or combination.
  • Errors: keep going past a failure with soft:, and react to it.

Scaling up ​

Sharing work between callers, and splitting tasks across files.

  • Running once: share one run of a task between every caller.
  • Modules: import another taskfile under a namespace.

Released under the BSD-3-Clause License.