Skip to main content

Module env_mode

Module env_mode 

Source
Expand description

Env-manifest mode: route a greentic.env-manifest.v1 answers document to the deployer’s env-apply engine (operator-surface PR-4).

greentic-setup --answers <manifest> is porcelain over greentic_deployer::cli::env_apply::apply — the same engine behind gtc op env apply. The manifest stays the durable artifact; setup adds routing (schema sniff), the --env cross-check, and flag mapping (--dry-runApplyMode::DryRun, --non-interactive → the headless contract). Env mode never starts the web UI: the manifest names every input, and the engine’s missing-inputs contract + TTY fill-in own the gaps.

Functions§

apply_manifest_with_store
Engine call with the store injected (tests pass a temp-rooted store).
run_env_apply
Env-mode entry: build the per-user store (the same default root gtc op uses) and run the engine, printing the standard {op, noun, result} envelope on stdout — stderr carries the engine’s human plan rows, byte-compatible with gtc op env apply.
sniff_env_manifest
Positive identification of an env-manifest answers document.