Skip to content

av health

Show package health for a project: a summary line of deprecated / unmaintained / updates-available counts, followed by one row per at-risk package.

Terminal window
av health [flags]

The binary ships as alertavuln; av is the common alias - they are interchangeable in every example.

av health requires you to be logged in (av login). It fetches two data sets for the project: at-risk packages (deprecated or unmaintained - healthy packages are filtered out server-side, so every listed package needs attention) and packages with a newer version available. It prints a summary line such as DEPRECATED 2 UNMAINTAINED 1 UPDATES AVAILABLE 5 (3 at-risk packages) followed by a table with the columns PACKAGE, ECOSYSTEM, STATUS, CURRENT, and LATEST.

--updates-only narrows the report to just the packages with a newer version available. --json replaces the table with raw JSON: an object with atRisk and updates keys by default, or just the updates payload with --updates-only.

--export writes the report to disk instead of stdout - a standalone HTML document (table plus the embedded JSON), or the raw JSON when combined with --json. A path with a file extension is used as-is; a path without one is treated as a directory (created if needed) and the file is named package-health.html or package-health.json.

Flag Default Description
--project - Project ID (required)
--updates-only false List only packages with a newer version available
--json false Output raw JSON instead of a table
--export - Export to a directory or file (HTML; raw JSON with --json)

Show the full package-health report for a project:

Terminal window
av health --project 1f0c9e2a-7b41-4a53-9c9e-2f9a1d3b8e77

List only the packages with a newer version available:

Terminal window
av health --project 1f0c9e2a-7b41-4a53-9c9e-2f9a1d3b8e77 --updates-only

Export a standalone HTML report - the file lands at ./reports/package-health.html:

Terminal window
av health --project 1f0c9e2a-7b41-4a53-9c9e-2f9a1d3b8e77 --export ./reports
Code Meaning
0 Health data retrieved and rendered or exported
1 Not logged in, an API request failed, or the export could not be written
  • av check - pre-flight a package for known vulnerabilities before you add it
  • av login - log in via the web browser