Skip to main content
Errand’s file format is defined in terms of HCL (HashiCorp Configuration Language). This page covers the HCL features that Errand uses. For the complete syntax definition, see the HCL native syntax specification.

Blocks

A block has a type, an optional name label, and a body enclosed in {}:
The block type is task. The label is "build". The body contains one attribute. Some blocks (like errand) take no label:

Attributes

An attribute assigns a value to a name:
Attribute values can be strings, numbers, booleans, lists, or expressions. Alignment of = signs is optional but common for readability.

Strings

Strings are enclosed in double quotes. You can use ${} for expression interpolation:
For multi-line shell commands, use heredoc syntax:
See heredocs for details.

Lists

Lists are written with square brackets. Items are separated by commas. A trailing comma is allowed:

Comments

Single-line comments start with // or #. Block comments use /* */:

Expressions

Expressions can be literals, references, function calls, or combinations:
See expressions for operators, conditionals, index access, and function calls.