license_inventory
List dependency licenses from lockfiles or installed packages, grouped by SPDX expression with sources, and flag unknown or ambiguous entries.
Instructions
List every dependency's license, grouped, with where each answer came from.
path is a project directory (lockfiles are found up to 3 levels down) or one lockfile.
License sources, in priority order: (1) packages already installed - a Python venv at
.venv/venv next to the lockfile, or the one you give as python (a venv dir, its
python executable, or a site-packages dir), node_modules, ~/.cargo/registry; (2) data in
the lockfile itself (package-lock.json has it); (3) a network lookup against PyPI / npm /
crates.io, ONLY if online=true. Anything none of these answers is UNKNOWN - never guessed.
The output groups packages by normalised SPDX expression with direct/transitive counts,
lists UNKNOWN packages with the reason, shows dual-licensed (OR) packages and which option
applies (allow is an optional list of SPDX ids you accept; otherwise the least
restrictive option is shown), and flags ambiguous spellings such as plain 'BSD'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| allow | No | ||
| online | No | ||
| python | No | ||
| list_limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |