CLI Commands and Flags
This page is full command reference. It is intentionally dense.
Command forms
broski --workspace <path> <command>
broski <task> [task-args...] [flags]
broski run <task> [task-args...] [flags]
broski list
broski graph <task> --format text|dot
broski doctor [--repair|--no-repair]
broski cache prune --max-size <MB>
Resolution rules
- Subcommands win over task names.
- Use
broski run <task>when you want explicit task resolution. - Reserved names are blocked as task names:
run,list,graph,doctor,cache,help,version.
Run behavior flags
These flags apply to broski <task> and broski run <task>.
| Flag | Default | Effect | Notes |
|---|---|---|---|
--dry-run | off | Compute graph and show what would run, without execution. | Useful for CI validation and migration checks. |
--explain | off | Print cache miss reasons per task. | Reasons are based on manifest deltas (input, env, run, outputs, etc.). |
--force | off | Bypass cache read and execute tasks. | Explain output shows cache bypass: --force supplied. |
--no-cache | off | Do not read from cache and do not write cache artifacts. | Explain output shows cache bypass: --no-cache supplied. |
--watch | off | Re-run target graph on input changes. | See Watch Mode. |
--force-isolation | off | Force strict isolation for graph tasks. | Not supported for interactive tasks. |
--jobs <n> | auto | Override worker concurrency. | Explicit run supports --jobs <n>. Implicit run supports --jobs=<n>. |
Global flags
| Flag | Effect |
|---|---|
--workspace <path> | Resolve broskifile, cache state, runtime lock, and paths relative to this workspace root. |
Example:
broski --workspace /path/to/repo run ci --explain
Important parsing detail
For implicit invocation (broski setup), Broski consumes engine flags itself:
broski setup --explain --dry-run
To pass a literal flag to the underlying task command, use --:
broski setup -- --explain
Subcommands
broski list
List tasks and aliases from the loaded broskifile.
@privatetasks are hidden from default listing.- Task descriptions are surfaced from preceding comments in DSL docs.
broski run <task> and broski <task>
Execute a target and its dependency graph.
- Graph tasks: staged, fingerprinted, cache-aware.
- Interactive tasks: no cache, no staging, TTY inherited.
Examples:
broski run ci --explain
broski ci --jobs=8
broski run build api release --force-isolation
broski test -- --grep slow
broski graph <task> --format text|dot
Show dependency graph for a target.
broski graph ci --format text
broski graph ci --format dot > graph.dot
Use dot output for Graphviz rendering.
broski doctor
Check runtime state and lock health under .broski/runtime.
| Mode | Behavior |
|---|---|
default (doctor) | Reports and repairs stale runtime state. |
--no-repair | Report-only mode, no mutation. |
--repair | Explicit repair mode. |
When an active lock is live, doctor refuses destructive cleanup.
broski cache prune --max-size <MB>
Prune local cache store to size budget.
- Unit is megabytes.
- Example:
broski cache prune --max-size 512
Output reports objects pruned, bytes freed, and remaining size.
Explain output details
When --explain is enabled, reasons are printed per task, for example:
cache miss: no prior execution recordcache miss: input changed: src/lib.rscache miss: env changed: RUSTFLAGScache miss: task command changedcache miss: output contract changedcache miss: secret env changedcache bypass: --force suppliedcache bypass: --no-cache suppliedcache bypass: interactive mode
@secret_env values are never printed; reason remains generic.
Operational patterns
Validate a migration without running
broski run ci --dry-run --explain
Rebuild once, then return to normal cache flow
broski run build --force
broski run build --explain
Run high-parallelism on large graph
broski run ci --jobs 12
# implicit form must use equals
broski ci --jobs=12
Interactive task with task-level passthrough
broski dev -- --host 0.0.0.0
Failure behavior
- Unknown task: hard failure with task name.
- Invalid DSL: parse/validation diagnostics include source context.
- Invalid
--jobsvalue: parse failure with actionable message. --force-isolationon interactive task: rejected.
Make/Just mapping
| Intent | Make/Just pattern | Broski command |
|---|---|---|
| Show tasks | make help / just --list | broski list |
| Run pipeline | make ci / just ci | broski ci |
| Render dependency graph | manual / limited | broski graph ci --format text |
| Force execution | phony/manual | broski run ci --force |
| Explain rebuilds | not first-class | broski run ci --explain |
| Cache trim | manual cleanup scripts | broski cache prune --max-size 512 |