license
Adds or replaces MIT LICENSE files across repositories.
Usage
git-wrangler license --name <copyright_holder> [--overwrite] [--yes] [--repo <path>] [--guided]
What it does
Discovers Git worktrees under the current directory, or targets exactly one worktree with --repo, and writes an MIT LICENSE file using the supplied copyright holder.
Existing LICENSE files are skipped unless --overwrite is provided. Creating missing files does not prompt. Replacing existing files prompts once for the whole candidate set unless --yes is supplied.
Options
| Flag | Required | Description |
|---|---|---|
--name <name> | Required | Copyright holder name. Interactive runs prompt when omitted. |
--overwrite | Optional | Replace existing LICENSE files instead of skipping them. |
--yes | Optional | Skip the overwrite confirmation prompt. |
--repo <path> | Optional | Target exactly one repository instead of discovering recursively. |
--guided | Optional | Interactively configure command options before execution. |
Examples
# Add a LICENSE to all repos that don't have one
git-wrangler license --name "Jane Doe"
# Replace existing LICENSE files after confirmation
git-wrangler license --name "Jane Doe" --overwrite
# Replace existing LICENSE files without prompting
git-wrangler license --name "Jane Doe" --overwrite --yes
# Target a single repo
git-wrangler license --name "Jane Doe" --repo my-project
Notes
- The generated license is always MIT format.
- The generated copyright line is
Copyright (c) <holder>. --yesonly skips the overwrite confirmation. It does not supply--name.