Skip to main content

Your First broskifile

Goal: define one interactive task and one deterministic graph task.

version = "0.5"

setup:
    @mode interactive
    npm install

build [target] [mode="release"]:
    @in src/**/* Cargo.toml
    @out dist/{{ target }}
    @requires cargo
    cargo build --bin {{ target }} --{{ mode }}

Run tasks:

broski setup
broski build api debug
broski run build --explain

Expected behavior:

  • broski setup streams output directly
  • broski build api debug produces declared output path
  • --explain reports why build ran or was reused

What this gives you

  • deterministic cache keys from @in, params, env, command, and metadata
  • strict graph mode when outputs are declared
  • interactive mode for long-running local workflows

Field quick-reference for this example

FieldTypeDefaultWhy it is used here
versionstringnoneEnables current DSL behavior (0.5).
@mode interactiveenuminferredForces direct terminal streaming for setup.
@inlistemptyDeclares content contract for cache key input.
@outlistemptyDeclares artifact contract for deterministic output.
@requires cargolistemptyFails fast when required tool is missing.

Next