One-shot generation
Passing --license, --set, or --get-tokens runs License Wizard as a single command — no prompts — so it fits cleanly into scripts and CI. Generate a license in one shot:
npx license-wizard --license MIT
This writes the official MIT text to LICENSE and records MIT in every manifest present.
Customizing copyright fields
Some licenses have fillable fields such as the year and copyright holder. List the fields a license accepts, then supply each one with a repeatable --set "field=value":
npx license-wizard --license MIT --get-tokens
npx license-wizard --license MIT --set "year=2026" --set "copyright holders=Erdem Bircan"
A field may be named by its label (e.g. year, case-insensitive) or its bracket token (e.g. <year>). Omit --set to write the official text unchanged.
Some licenses (the GPL family) declare no copyright field in their LICENSE text but do in their header notice. --get-tokens lists those header fields too, and they apply only when you also write a full header — supplying one on its own tells you it belongs to the header and to add --headers full.
If you start customizing but leave out a required field, License Wizard writes nothing — it lists the missing fields and exits non-zero, so you (or a calling agent) know exactly what to provide.
Unrecognized identifiers
SPDX identifiers are exact — apache-2-0 is not Apache-2.0. On a typo, License Wizard reports that no license matches, suggests the closest identifiers, and exits non-zero rather than failing with a stack trace.
Previewing without writing
Add --dry-run to any run to print the license that would be generated and a summary of the writes that were skipped — no LICENSE, config, or manifest changes are made. It works in the interactive wizard too.