Pick and manage LICENSE files with a guided CLI.
npx nicelicenseInteractive mode:
npx nicelicenseNon-interactive mode:
npx nicelicense --license MIT --yes --name "Jane Doe" --years 2024List supported licenses:
npx nicelicense --listList with details:
npx nicelicense --list --verboseMachine-readable output:
npx nicelicense --list --json- Detects an existing LICENSE file and identifies it using distinctive fingerprints.
- Downloads license text from canonical URLs on selection and verifies fingerprints.
- Updates the
licensefield inpackage.jsonwhen present. - Uses
git config user.nameanduser.emailas defaults when available.
See docs/CHANGELOG.md for release history.
Extend data/licenses.json to add more SPDX IDs and source URLs.
--license <SPDX> Select a license without prompting
--path <path> Write the license to a specific path
--name <name> License holder name
--email <email> License holder email
--years <years> Copyright years (e.g. 2024 or 2020-2024)
--software <name> Software/project name
--description <text> Project description
--organization <org> Organization name
--list Print supported SPDX IDs
--verbose Include URLs and metadata with --list
--json Emit machine-readable JSON output
--yes Accept prompts (overwrite/license field updates)