Skip to main content

Module cli

Module cli 

Source
Expand description

Command-line argument parser for the haz binary.

Built on bpaf 0.9 using the combinator API; the derive macro is deliberately not used so the parser type tree stays decoupled from bpaf’s macros. The parser produces a Cmd sum: one variant per command shape that the spec names normatively (haz run, haz check, haz cache clear, haz cache clean --soft).

--help and --version are provided by bpaf automatically; the version string is sourced from CARGO_PKG_VERSION at compile time.

Structs§

CacheCleanArgs
Arguments parsed for the haz cache clean subcommand.
CheckArgs
Arguments parsed for the haz check subcommand.
InitArgs
Arguments parsed for the haz init subcommand.
QueryArgs
Arguments parsed for the haz query subcommand.
RunArgs
Arguments parsed for the haz run subcommand.
WhyArgs
Arguments parsed for the haz why subcommand.

Enums§

Cmd
Top-level command parsed from argv.
FieldPresence
Per-field presence selector for the --has-X / --no-X flag pairs of QRY-005. Encoding the pair as a single tri-state value lifts the spec’s intra-pair mutex (within a pair, the two flags are mutually exclusive) into the type system, so the invariant cannot be violated at any layer.
GitFilter
Git-changeset filter selected on the haz run invocation.
OutputFormat
Output presentation for haz query per QRY-008.
OutputMode
How the executor surfaces a running task’s stdout and stderr to the user.
Scope
How broadly a task-set selection ranges over the workspace.
TaskRef
A validated task reference.

Functions§

cli
Build the top-level argument parser.