Collect all third party licenses in dependencies into one file, and notify about missing licenses.
go install github.com/aviadl/thirdPartyLicenseCollector@latest
# Vendor mode (default) — reads vendor/modules.txt
thirdPartyLicenseCollector -go-project /path/to/project -format json
# List mode — uses "go list -m" and the module cache (no vendor dir needed)
thirdPartyLicenseCollector -go-project /path/to/project -format json -go-mode list| Flag | Default | Description |
|---|---|---|
-go-project |
Go project directory | |
-npm-project |
npm project directory | |
-npm-node-modules |
node_modules directory (if different from npm-project) | |
-out |
THIRD_PARTY_LICENSE |
Output file name |
-format |
txt |
Output format: txt or json |
-go-mode |
vendor |
Go dependency resolution: vendor or list |
vendor(default): Readsvendor/modules.txtto discover dependencies and scansvendor/<module>/for license files. Requiresgo mod vendororgo work vendorto be run first.list: Runsgo list -m -json allto discover dependencies and reads license files from the Go module cache. No vendor directory needed. Requires modules to be downloaded (go mod download).