license (internal)¶
Apply a project's license — sets the SPDX license / license-files metadata in
pyproject.toml and writes the LICENSE file's full text.
Not a slash command
This is an internal procedure (plugin/prompts/license.md), not something you
invoke. /rhiza:init reads and follows it at its step 5c,
right after the skeleton.
You're asked for the id. Bundled full texts: MIT, Apache-2.0,
BSD-3-Clause. none clears the metadata and leaves any existing LICENSE in
place. Overwriting an existing LICENSE is opt-in — without --force the script
refuses and exits 3, changing nothing at all, metadata included.
What it does¶
Runs the bundled plugin/scripts/set_license.py — stdlib-only — which:
- replaces (not just adds) the SPDX
license/license-filesfields in the[project]table — the PEP 639 expression field, never a deprecatedLicense :: OSI Approved :: …trove classifier; - writes the
LICENSEfile from the bundled template, filling the copyright year and holder; - for
none, clears the metadata and leaves any existingLICENSEuntouched.
The command settles three inputs first: the license id (argument or a prompt),
the copyright holder (derived from the origin remote's owner or
git config user.name, else asked), and — only when an existing LICENSE would
change — an overwrite confirmation.
Notes¶
- Works without the
rhizaCLI installed. - Safe by default: without
--forcethe script refuses to overwrite a differingLICENSEand exits 3, changing nothing (metadata included) — so the file and the metadata never diverge. - A non-bundled SPDX id still sets the metadata; the script tells you to add the
LICENSEtext by hand.
Reference¶
| Source | plugin/prompts/license.md |
| Invocation | not a slash command — reached with Read, never invoked |
| Read by | /rhiza:init, known-issues, skeleton |