Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.

from @unified-product-graph/cli · Graph

upg fmt

Rewrite .upg files to canonical form (byte-stable, diff-friendly).

Usage

upg fmt [files...] [options]

Arguments

[files...]
Paths to .upg files. Defaults to the discovered .upg file.

Options

--check
Do not write; exit non-zero if any file is not already canonical. For CI.

Examples

Format the discovered .upg file in place

upg fmt

Format every graph in the workspace

upg fmt .upg/*.upg

CI gate: fail if any file is not canonical

upg fmt --check .upg/*.upg

Output

1 file(s) not in canonical form:
  .upg/threadline.upg

Run `upg fmt` to fix.

Related

upg initupg exportupg verify