Skip to main content

Module cli

Module cli 

Source
Expand description

Typed builders for sui and nix CLI invocations.

Two consumers today (crate::probe::Probe and crate::rebuild::RebuildProbe), with a third already in the roadmap (any future Probe-shaped domain). Extracting the canonical invocation surface here means:

  1. The --extra-experimental-features "nix-command flakes" incantation lives in exactly one place. When cppnix changes its CLI conventions, one edit covers every probe.
  2. The sui side gets a symmetric typed border — invocations always reach sui via the same builders, so the differential sweep is comparing apples to apples by construction.
  3. A new probe domain implements its ParityCheck::sui_invocation / nix_invocation by composing these primitives, not by hand-writing Command::args(...).

NO SHELL — every argument is added via typed Command APIs. No shell escaping concerns because nothing ever goes through a shell.

Modules§

nix_cli
Canonical nix CLI invocations. Every builder returns a pre-configured Command ready for spawn() (with whatever stdio + env the caller layers on).
sui_cli
Canonical sui CLI invocations — symmetric with nix_cli.

Constants§

NIX_EXPERIMENTAL_FEATURES
Canonical experimental-features set required by every modern nix CLI invocation that touches flakes or new commands. Kept as a const so it’s textually obvious in the generated argv.