license
Add, replace, or remove standard LICENSE files.
Usage
git-wrangler license --type <id> [options] | git-wrangler license remove [options]Quick start
git-wrangler license --type mit --name "Jane Doe"
What it does
license writes a standard root LICENSE file in each target repository. Existing files are skipped unless --overwrite is used.
Supported IDs are 0bsd, agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, and unlicense.
Add or replace licenses
| Option | Default | What it does |
|---|---|---|
--type <id> |
Required | Choose the license template. |
--name <name> |
— | Set the copyright holder when the license requires one. |
--year <year> |
Current year | Set the copyright year when the license uses one. |
--overwrite |
Off | Replace existing root LICENSE files after confirmation. |
--repo <path> |
Whole workspace | Target exactly one repository. |
--yes, -y |
Off | Skip the overwrite confirmation. |
--guided |
Off | Choose options through prompts. |
Holder-free templates such as 0bsd, bsl-1.0, cc0-1.0, and unlicense do not need --name.
Remove licenses
Warning:
license removepermanently deletes exact root files namedLICENSE. It does not removeLICENSE.md,LICENSE.txt, orCOPYING.
git-wrangler license remove
The command previews repositories with a removable LICENSE file and asks once before deletion.
| Option | Default | What it does |
|---|---|---|
--repo <path> |
Whole workspace | Target exactly one repository. |
--yes, -y |
Off | Skip the removal confirmation. |
--guided |
Off | Choose options through prompts. |
More examples
# Replace existing Apache licenses after review
git-wrangler license --type apache-2.0 --name "Jane Doe" --overwrite
# Add a holder-free license
git-wrangler license --type 0bsd
# Remove one repository's root LICENSE file
git-wrangler license remove --repo ./api