CLI Contract

One command surface for the full upgrade path.

The desktop app is the default human experience. The CLI remains the stable command surface for CI, GitOps, scripted workflows, and advanced debugging.

Core commands

  • analyze compares a source artifact against a target version and emits JSON and Markdown findings.
  • rewrite applies deterministic safe actions and reviewable assisted scaffolds from an analysis plan.
  • validate checks target version, extension inventory, and destination process-group readiness.
  • publish hands off reviewed outputs to a filesystem, Git-backed registry tree, or NiFi Registry.
  • run orchestrates the full flow end to end.

Use this when: you want repeatable automation or explicit command-level control.

nifi-flow-upgrade analyze \
  --source ./flow.json.gz \
  --source-format flow-json-gz \
  --source-version 1.27.0 \
  --target-version 2.0.0 \
  --rule-pack ./examples/rulepacks/nifi-1.27-to-2.0.official.yaml \
  --output-dir ./out

Reports and exit behavior

  • JSON output is machine-friendly for CI and policy gates.
  • Markdown output is review-friendly for flow owners and platform teams.
  • Blocked findings return a non-zero exit code so pipelines can stop early.
  • auto-fix means a safe rewrite candidate exists, not that the artifact has already changed.
  • assisted-rewrite means the tool can scaffold part of the migration, but a human still needs to review the result.

Target validation

  • Manifest-only validation works offline.
  • Live validation can query NiFi /flow/about and /flow/runtime-manifest.
  • Destination process-group checks help catch bad imports before production.