Generate a THIRD_PARTY_NOTICES file for npm and Python

A notices file is the plain-text list of every open-source package you ship, grouped by license, with each license's full text included. Most permissive licenses require it. Nobody enjoys assembling one by hand across 800 transitive dependencies. This page covers what the obligation actually is, how to see every license in your tree for free, and how to generate and regenerate the file.

Why notices files exist

MIT, BSD, and Apache-2.0 are permissive about what you can do with the code, but not silent about credit. All three carry an attribution condition: distribute the software, in source or binary form, and you must carry the copyright notice and the license text along with it. Apache-2.0 adds a NOTICE file rule on top. A single file named THIRD_PARTY_NOTICES (or NOTICE, or an "Open Source Licenses" screen) is the usual way to satisfy all of them at once.

In practice you are asked for it at three moments:

The file is also the cheapest compliance artifact you will ever produce, because the information is already sitting on your disk. It just has to be read correctly.

Step one: see what is actually in your tree

Before generating anything, find out what you are attributing. From your project root:

npx licenseproof scan

That reads your lockfile, resolves each package's license from the metadata and license files already on disk, and prints an inventory plus anything that conflicts with your own project's license. It is free, needs no account or key, and makes no network calls at scan time: every bit of reference data ships inside the package. Production dependencies only by default; add --include-dev to pull in devDependencies too.

The output sorts findings into four buckets you care about here:

How the resolver reaches each answer, including what the confidence levels mean and where it gives up, is written out in full.

Fixing or documenting what the scan flags

A conflict is a conflict relative to your project's license, so the first thing to check is whether the tool knows what that is. It reads your license from package.json's license field, or from pyproject.toml's [project.license] or the legacy [tool.poetry].license. If nothing is declared anywhere, it assumes the strictest, proprietary-equivalent rules and says so in the output. Override it explicitly:

npx licenseproof scan --project-license Apache-2.0

That one flag is often the whole fix. A repo whose manifest says UNLICENSED but which actually ships under Apache-2.0 will show copyleft packages as CONFLICT until you tell it otherwise.

Once the project license is right, the remaining flags come down to three moves:

Generating the file

The notices file itself comes from the report command, which is the paid tier:

npx licenseproof report --format notices --out THIRD_PARTY_NOTICES.txt

It groups every package by its resolved license string and prints that license's full text once per group. The text comes from the vendored license data when the license is a known one; otherwise from the package's own on-disk license file; and when neither exists, the entry carries an explicit "text unavailable" note. Nothing is fabricated and nothing is silently omitted, which is the property that makes the file worth handing to someone.

The same command generates the other audit-facing artifacts from the identical scan pipeline, so a report and a scan --format json run against the same project can never disagree. Available formats are html, pdf, notices, sbom-cyclonedx, and sbom-spdx, comma-separated or as repeated flags. Ask for more than one and --out becomes a directory; omit it entirely and everything lands in ./licenseproof-report/.

npx licenseproof report --format notices,html,pdf --out licenseproof-reports/

See a real generated report before buying anything. sbom-cyclonedx is free and needs no key; notices, the HTML and PDF reports, and the SPDX SBOM are the paid tier.

Regenerating it in CI

A notices file is wrong the moment a dependency changes, so generate it on every build rather than once by hand. The published GitHub Action wraps the CLI:

name: License check
on: [push, pull_request]
jobs:
  licenseproof:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 22 }
      - run: npm ci
      - uses: thrillhouse34/licenseproof-action@v1
        with:
          fail-on: conflict
          license-key: ${{ secrets.LICENSEPROOF_LICENSE_KEY }}
          report-formats: notices,html,pdf

With license-key set, the action runs the free scan and then generates the formats named in report-formats, uploading them as a separate build artifact so the free report and the paid pack download independently. Leave license-key empty and nothing below it runs: you get the free scan, exactly as if you had never added the line. A secret that is not configured arrives as an empty string, so a half-finished setup degrades to the free scan instead of failing the build.

The report step runs even when the scan has already failed the job, which is the run you most want the artifact for. Gating CI on license conflicts covers the fail-on thresholds and the rest of the action's inputs.

Python projects: which file gets read

A Python project is detected by its manifests, and exactly one tier is used — the most specific one present, in this order:

  1. uv.lock — the full resolved tree, production plus every dev group, parsed directly.
  2. poetry.lock — the full resolved tree, cross-referenced against pyproject.toml to tell production from dev.
  3. requirements.txt — only lines pinned exactly as name==version resolve. Git, URL, and local-path installs and unpinned ranges are reported as warnings rather than dropped. The file carries no transitive information, so everything in it is reported as a direct dependency. A disclosed limitation, not a bug.
  4. pyproject.toml — the declared-only fallback, used when no lockfile of any kind exists. Versions are marked unresolved and the transitive tree is incomplete by construction.

One thing worth doing before you generate notices for a Python project: install the dependencies into a .venv next to the manifest first.

python -m venv .venv && .venv/bin/pip install -r requirements.txt
npx licenseproof report --format notices --out THIRD_PARTY_NOTICES.txt

Licenses resolve from the installed .dist-info metadata and on-disk license files. With no environment present, packages are still listed by name, version, and whether they are direct or dev, but the disk-backed lookup is skipped and they resolve to unknown. A notices file full of unknowns is not a notices file. Conda environments and Pipenv are not supported at all.

Mixed Node and Python repos

A repo with a package.json and a pyproject.toml or requirements.txt side by side is scanned as one combined report, not two. Both ecosystems are detected independently and merged, so you get a single notices file covering everything you ship rather than two files that someone else has to reconcile.

There is one tie-break to know about. If both manifests declare a project license and the two disagree, the package.json one wins for conflict-checking purposes, and the tool prints a warning saying so. Pass --project-license to settle it yourself. Monorepos are a separate and still-open gap: a workspace root scans only its own top-level package.json, with a warning.

FAQ

Do development dependencies belong in the notices file?

Attribution conditions are triggered by distribution, so the common reading is that a build tool or test framework you never ship does not need attributing, while anything bundled into what the customer receives does. That is why the default scan is production-only. The catch is that "we don't ship it" is an assumption about your build, not a fact the scanner can check — a bundler can inline something you thought was a dev dependency. Run --include-dev at least once, look at the difference, and decide deliberately.

We run a SaaS. Does AGPL still matter if we never distribute anything?

That is the specific gap AGPL was written to close. Its network clause reaches users who interact with the software over a network, so "we only host it" is the situation it addresses rather than an exemption from it. licenseproof treats an AGPL package as a CONFLICT regardless of what your own project is licensed as, precisely because the networked-use obligation does not care. If you have one, that is a conversation to have with counsel, not a flag to suppress.

Does the scan send my dependency list anywhere?

No. No network calls, no telemetry, no account, and no phone-home even for key verification. Everything the tool needs is vendored in the package, and the reports render on your machine. You can read the source: it is published, source-available under the Elastic License 2.0.

Is any of this legal advice?

No. licenseproof produces an informational license categorization from declared package metadata and on-disk license files, using fixed vendored SPDX data and a reviewed rule set. The categories and conflict calls are heuristics. They are not a legal opinion, they are not a determination of your obligations, and no automated tool can be either. What you get is a complete inventory with every answer labelled by where it came from, which is the part a lawyer would otherwise bill you to assemble.

Start with the free scan

Run npx licenseproof scan and see what is in your tree. It costs nothing and asks for nothing. If you then need the notices file and the reports to go with it, the report tier is $29 for an individual and $99 for agency use — both perpetual, each including a year of reference-data updates, and both working forever after that.

See pricing and get the report tier