usage diff
- Usage:
usage diff [FLAGS] <OLD> <NEW> - Effect: read-only
- Source code:
cli/src/cli/diff.rs
Compare two usage specs and report what changed about the interface
Findings are grouped into breaking changes (a command line that used to work now fails, binds differently, or resolves to a different value), compatible changes (the interface gained something or relaxed a rule), and metadata changes (help text, effect, deprecation — nothing about parsing).
Exits 1 when there is a breaking change, so a release job can gate on it, and either spec may be "-":
mycli --usage-spec | usage diff released.usage.kdl -
version is ignored on purpose: a release bumps it, and a check that fires every release does not get left switched on.
Arguments
<OLD>
The spec as it was, typically the released one, use "-" to read from stdin
<NEW>
The spec as it is now, use "-" to read from stdin
Flags
-f --format <FORMAT>
Output format
Choices:
textjson
Default: text
-b --breaking
Report only breaking changes
--exit-zero
Exit 0 even when there are breaking changes