npm licences, checked by how you ship
AGPL matters for a SaaS, GPL matters for an app people download. licensegate reads your whole dependency tree and tells you which packages conflict with your way of shipping.
npx -y https://licensegate.org/dl/licensegate.tgz --mode saas --prodlicensegate 0.2.0 · mode saasdistributedlibraryinternal · production only · 9 packages from package-lock.json
- my-app@1.0.0
- express@4.21.2MITokokokok
- body-parser@1.20.3MITokokokok
- react@18.3.1MITokokokok
- some-db-driver@2.0.0AGPL-3.0-onlyBLOCKBLOCKBLOCKok
- rich-editor@3.1.0GPL-3.0-onlyokBLOCKBLOCKok
- media-codec@0.9.4LGPL-2.1-or-laterokREVIEWREVIEWok
- fancy-chart@1.4.2CC-BY-NC-4.0REVIEWREVIEWREVIEWREVIEW
- geo-utils@1.2.0MPL-2.0okREVIEWREVIEWok
- tiny-parser@2.3.0MIT OR GPL-3.0okokokok
7 ok · 1 to review · 1 blocking4 ok · 3 to review · 2 blocking4 ok · 3 to review · 2 blocking8 ok · 1 to review · 0 blocking
The same 9 packages, judged for each way of shipping. In a terminal licensegate prints the review and block lines and the totals; --json lists every package with its verdict.
Why the way you ship changes the answer
| You ship… | --mode | AGPL | GPL | LGPL / MPL | Non-commercial |
|---|---|---|---|---|---|
| A hosted web app or API | saas | block | ok | ok | review |
| An app people download (desktop, mobile, Electron, on-prem) | distributed | block | block | review | review |
| A package other people install | library | block | block | review | review |
| Internal tools only | internal | ok | ok | ok | review |
A list of licence names, which is what most checkers print, doesn't tell you which of them is a problem. A GPL package is usually fine on a server you run yourself. The same package can become a problem when you ship a desktop app. licensegate applies that rule to every package, including the ones you never installed directly.
What it does
- Works with npm, pnpm, yarn and bun: reads
package-lock.jsonor the installednode_modules, and tells production dependencies from dev ones. - Resolves SPDX expressions:
MIT OR GPL-3.0means you pick MIT. HandlesWITHexceptions, oldlicensesarrays and loose names. - When
package.jsonsaysSEE LICENSE IN…or nothing, it reads the package’s LICENSE text. - Exit code 1 in CI when something blocks your mode.
--allowclears a package you have checked. - Writes a CycloneDX 1.5 SBOM (
--sbom) and a third-party notices file with every licence text (--notices). - Runs offline with zero dependencies. Your code never leaves your machine.
sbom.cdx.json{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"components": [
{ "type": "library",
"name": "fancy-chart", "version": "1.4.2",
"purl": "pkg:npm/fancy-chart@1.4.2",
"licenses": [{ "license": { "id": "CC-BY-NC-4.0" } }] },THIRD_PARTY_NOTICES.txtTHIRD-PARTY SOFTWARE NOTICES
Generated by licensegate 0.2.0 on 2026-10-21 from package-lock.json.
------------------------------------------------------------------------
express@4.21.2
License: MIT
(The MIT License)
Copyright (c) 2009-2014 TJ HolowaychukCI · release job BLOCK some-db-driver@2.0.0 AGPL-3.0-only
7 ok · 1 to review · 1 blocking
SBOM → sbom.cdx.json
Error: Process completed with exit code 1.Install and run
Nothing to install globally: npx downloads it, runs it and leaves your project untouched. Node.js 18 or newer.
npx -y https://licensegate.org/dl/licensegate.tgz --mode saas --prod
In any CI
GitHub Actions, GitLab, Bitbucket or any runner with Node:
- run: npm ci
- run: npx -y https://licensegate.org/dl/licensegate.tgz --mode saas --prod --sbom sbom.cdx.json
The command exits with code 1 when a dependency conflicts with your mode, so the job fails before the release.
Guides
- Can I use an AGPL npm package in a SaaS? AGPL adds a network clause to the GPL: if users interact with your modified program over a network, they can ask for its source. How to find AGPL packages in your npm tree before they ship.
- GPL and LGPL in a JavaScript bundle Shipping a bundle or an Electron app is distribution. GPL code inside it can pull your app under the GPL; LGPL asks that users can replace the library. What to check in your npm tree.
- A CycloneDX SBOM for npm, in one command Create a CycloneDX 1.5 SBOM from package-lock.json with licences and purls, without installing anything. Why customers and the EU Cyber Resilience Act ask for one.
- Licence audit before selling a SaaS Buyers ask whether your code has GPL or AGPL in it. How to produce a dependency licence inventory, an SBOM and third-party notices in minutes before a sale or a client handover.
- Privacy What licensegate and this website collect: nothing from the CLI; anonymous visit statistics on the website.