Skip to content

CLI commands

Run emendant <command> --help for the interface shipped with your installed version.

Run all four stages and report findings.

Terminal window
npx emendant scan [options]
Option Effect
--json Print stable machine-readable output.
--package <name> Limit to one package; repeat for several packages.
--severity <list> Comma-separated breaking, deprecation, and behaviour.
--adopted Also report old call sites found after the release was adopted.
--config <file> Read a specific configuration file.
--cwd <dir> Scan another directory.
--verbose Print counts, provenance hops, and informational notes.
--no-color Disable terminal colour. NO_COLOR is also respected.

--feed <dir> replaces the bundled feed and is intended for feed development and diagnostics.

Print the source and guidance behind a result:

Terminal window
npx emendant explain <change-id>
npx emendant explain <finding-id>

A finding ID adds the site and its provenance chain. Supported options are --cwd, --feed, --json, and --no-color.

Inspect the packages and versions found in manifests and lockfiles:

Terminal window
npx emendant detect --cwd .

Use --all to list transitive dependencies, --json for structured output, and --verbose for informational notes. Detection never produces findings, so it exits 0 when successful.

Show the files that survive the inexpensive source walk and candidate gate:

Terminal window
npx emendant prefilter --verbose

A candidate is not a finding. Comments and strings can make a file a candidate because no syntax tree has been checked yet. --all-packages searches every bundled feed entry and intentionally inflates the candidate set.

Run structural matching without version placement:

Terminal window
npx emendant match

A match proves the code uses the changed API, regardless of what version is installed. Use scan for actionable repository findings. --all-packages and --feed are diagnostic options.

Code Commands Meaning
0 All Completed; scan found nothing.
1 scan Completed with findings.
2 All Invalid input or a tool error prevented completion.

The deterministic fix command is under active development and is not part of the private-preview documentation contract yet.