Skip to content

Run a scan

emendant scan is the main user command. It runs detection, feed selection, file filtering, structural matching, and version placement as one read-only operation.

Terminal window
npx emendant scan

To scan a different directory:

Terminal window
npx emendant scan --cwd ../my-project

Run from the root of a monorepo. Emendant discovers only the workspaces declared by the root package manager and reports each one separately.

Limit the scan to one or more packages by repeating --package:

Terminal window
npx emendant scan --package openai
npx emendant scan --package openai --package ai

Filter by comma-separated severity values:

Terminal window
npx emendant scan --severity breaking,deprecation

The accepted values are breaking, deprecation, and behaviour. When no severity filter is supplied, breaking changes and deprecations are selected by default.

By default, Emendant focuses on changes ahead of the installed version. Add --adopted to include old call sites found in code that is already on the relevant release:

Terminal window
npx emendant scan --adopted

An adopted result may be a live bug, dead compatibility code, or an intentional shim. It is kept out of the default report because the scanner cannot safely guess which.

Terminal window
npx emendant scan --verbose

Verbose output adds per-workspace walk and candidate counts, complete provenance hops, and informational notes. Coverage warnings appear even without --verbose because they mean Emendant could not check part of the repository.

Terminal window
npx emendant scan --json > emendant-report.json

JSON output includes the feed summary, totals, findings, call sites, workspace statistics, provenance chains, and warnings. The command still returns exit code 1 when findings are present.

Use either interface:

Terminal window
npx emendant scan --no-color
NO_COLOR=1 npx emendant scan

Emendant already respects tracked .gitignore files and excludes common dependency, build, cache, coverage, virtual-environment, and vendored directories. Add project-specific exclusions with ignore in emendant.json.