CLICommands
diffLast updated on
Last updated on
Compare two artifacts
Shows differences between two artifact files.
Usage
ofm diff <file1> <file2> [options]Arguments
| Argument | Description |
|---|---|
file1 | First artifact file to compare |
file2 | Second artifact file to compare |
Options
| Option | Description |
|---|---|
--name-only | Show only if files differ (no content diff) |
Description
The diff command compares two artifact files and displays the differences in unified diff format. It attempts to parse both files as artifacts to show artifact names in the output.
Examples
Compare two files:
ofm diff form-v1.yaml form-v2.yamlCheck if files differ:
ofm diff form-v1.yaml form-v2.yaml --name-onlyOutput
When files differ:
--- lease-agreement (form)
+++ lease-agreement (form)
@@ -5,7 +5,7 @@
version: 1.0.0
title: Residential Lease Agreement
fields:
- monthlyRent:
+ rentAmount:
type: money
label: Monthly Rent
required: trueWhen files are identical:
Files are identicalWith --name-only:
Files differ