npm set init-license 'MIT'

Category: Node.js & npm/yarn

npm set init-license 'MIT'

Set the default license written into new package.json files

Saves a default license to npm's global config so new projects automatically declare MIT (or whatever you set) without you having to type it every time.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.