Skip to main content

DSL Reference Table

This page is factual reference only: types, defaults, and constraints.

Global keys​

KeyTypeDefaultConstraints
versionstringnoneRequired. Minor version must be between 0.3 and the running binary's own minor version (currently 0.7 for v0.7.1) — declaring a newer minor than your installed binary fails with an upgrade message. Existing broskifiles that say "0.5" remain valid; you don't need to bump this just to use newer CLI/TUI features.
alias <name> = <target>declarationnoneTarget must exist (possibly transitively). Cycles are invalid. Cannot equal its own target, shadow a task name, or shadow a reserved CLI subcommand name.
KEY = "value"top-level variablenoneMust appear before the first task header. Supports {{ OTHER_VAR }} interpolation; cycles rejected.
KEY = $(command)top-level variablenoneDynamic; runs via sh -lc, 5s timeout, 1 MiB output cap, evaluated lazily only if referenced by the task being run.
@load <path>directivenonePath is workspace-relative. File must exist.
@import <path>directivenonePath is workspace-relative. Circular imports are rejected. Depth limit 10.

Task header​

FormTypeDefaultConstraints
task_name:declarationnoneUnique task name.
task_name: dep_a dep_bdeclarationnoneDependencies must exist.
[param]parameterrequiredValue must be provided at runtime.
[param="value"]parameter"value"Default used when no runtime arg provided.

Task annotations​

AnnotationTypeDefaultConstraints
@in <patterns...>list of stringsemptyGlob patterns. Drives graph fingerprinting. A ** pattern that matches nothing degrades to a literal (likely-missing) path rather than erroring.
@stage_ro <paths...>list of stringsemptyRead-only staged paths (symlinked into the sandbox). Path must already exist; must not overlap @out. Disallowed on interactive tasks.
@out <paths...>list of stringsemptyDeclares graph outputs. Enables graph mode by default.
@env KEY=valuekey-valuenoneInjects explicit env value.
@env KEYkeyinheritReads value from runtime env (.env via @load first, then host).
@secret_env KEYkeynoneRedacted in explain/log output (values ≥6 chars only); also implicitly inherited like bare @env KEY; fingerprinted via keyed BLAKE3.
@dir <path>stringworkspace rootWorkspace-relative. Exactly one value.
@mode graph|interactiveenuminferred@out implies graph when mode omitted; no @out implies interactive.
@isolation off|best_effort|strictenumstrict on Linux, best_effort elsewherestrict is Linux-only (bwrap). strict/best_effort clear the env to PATH,HOME,USER,TMPDIR,SHELL,TERM before applying @env; off inherits the full parent env.
@requires <tools...>list of stringsemptyTools must be resolvable in PATH. Checked once per unique tool, for the whole resolved graph, before any task starts.
@privateflagfalseHidden from default task listing and from the TUI launcher's task list.
@confirm "message"stringnoneRequires user confirmation before execution; fails immediately if stdin isn't a TTY (never silently proceeds).

Built-in interpolation​

ExpressionTypeDefaultNotes
{{ os() }}stringnoneHost OS identifier (std::env::consts::OS).
{{ arch() }}stringnoneHost architecture identifier (std::env::consts::ARCH).
{{ env("KEY") }}string"" if missingOne-arg form: missing var resolves to an empty string, not an error.
{{ env("KEY", "fallback") }}stringfallback if missingTwo-arg form: explicit fallback when var is unset.
{{ PARAM }}stringnoneResolves a top-level variable first, then a task parameter of the current task.

Mode behavior summary​

ModeCachingStagingTTYTypical usage
graphenabledyesbuffered/reportingbuild, test, package
interactivebypassednoinheriteddev server, watch, REPL

CLI examples for parameter binding​

broski build api debug
broski run build --explain