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

FlagRequiredDescription
--name <name>RequiredCopyright holder name. Interactive runs prompt when omitted.
--overwriteOptionalReplace existing LICENSE files instead of skipping them.
--yesOptionalSkip the overwrite confirmation prompt.
--repo <path>OptionalTarget exactly one repository instead of discovering recursively.
--guidedOptionalInteractively 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>.
  • --yes only skips the overwrite confirmation. It does not supply --name.