Automatically generate OSS attributions in a Node.js project


In the terminal, type the following one-liner.

npx license-checker-rseidelsohn --direct

Used license-checker-rseidelsohn instead of license-checker since it fixes the direct option, which only looks for dependencies in the package.json file.


Exclude Package

Specifying version value in package.json includes the current project in the output. Remove the version value, or use the excludePackages option.

--excludePackages 'package-name-goes-here'

Markdown Generation

Using markdown and out option to generate a file.

// Terminal
npx license-checker-rseidelsohn --direct --markdown --out
[eslint@7.32.0]( - MIT
[postcss@8.4.7]( - MIT

Auto-run After Install

Add npx license-checker-rseidelsohn to the postinstall script. Options can be passed, so the above ‘Markdown Generation’ code can be used.

// package.json
"scripts": {
"postinstall": "npx license-checker-rseidelsohn"

Note that the postinstall script will not be executed when specific packages are installed with the npm install [<@scope>/]<pkg> and related commands. Manually execute npm install or npm run postinstall afterwards in order to overcome this restriction. (After all, postinstall is just another script.)


Open Source Licenses, Samsung Developers



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Node.js and web developer using TypeScript. Undergraduate in Seoul National University.