ubx diff compiles the XCL stack and runs a preview against the current deployed state. With --from, it compares the stack at a git ref to the current deployed state — useful for reviewing what a PR would change.
Usage
Flags
| Flag | Description |
|---|---|
--from <git-ref> | Git tag, branch, or commit SHA to compare against |
--json | Output raw Pulumi JSON preview |
Examples
How --from works
- ubx lists all
.xclfiles in the stack directory - For each file, runs
git show <ref>:<path>to get the file at that ref - Writes the files to a temporary directory
- Compiles the temporary directory and runs
pulumi preview - Cleans up the temporary directory
Without --from
Without --from, ubx diff is equivalent to ubx plan — it compiles the current source and previews against the deployed state.
Use in GitOps
In a PR workflow:Exit codes
| Code | Meaning |
|---|---|
0 | Diff succeeded |
1 | Compile/typecheck/diff error |

