init prepares the exact external Dialects and Policy Pack sources selected
by rootform.lock. The optional path defaults to . and identifies the
Rootform project to prepare; it need not be a Terraform/OpenTofu root. init
does not detect providers, pick versions, or modify the lock.
rootform init [path] [options]An existing lock is preserved. Without a lock, ordinary init has an empty
selection; --locked instead requires an existing valid lock. Embedded
Dialects need no acquisition. For selected OCI content, init may fetch
only exact selected digests when network use is allowed. If a vendor family
exists, init verifies its exact tree, including missing, extra, or changed
content; a valid tree needs no installed copy or registry access. --offline
restricts preparation to verified local content. --no-input disallows
prompts and requires deterministic action.
Replace ./infra with an existing project directory. The --locked example
requires that project to contain a valid rootform.lock beforehand.
Run the first command to prepare its selection, the second to prove it can be
prepared from local bytes alone, and the third when a machine-readable result
is needed.
rootform init ./infra --no-inputrootform init ./infra --locked --offline --no-inputrootform init ./infra --format jsonWith external content selected, text output starts with Project prepared,
then reports External Dialects and External Policy Packs counts. With no
external content selected, it starts with Project ready, then reports
External content none. Machine JSON goes to standard output; diagnostics and
--details output go to standard error. Neither text nor JSON writes
rootform.lock. Status 0 means preparation completed; 1 means selected
content is invalid, missing, or differs from rootform.lock; 2 means the
command was used incorrectly; 3 means rootform.lock is required or invalid,
or --offline needs content that is not installed; and 4 means a file, the
Rootform home, or the registry could not be read or written. See
Select Dialects and Policy Packs and
External content storage.