pi-gen-license
v1.0.0
Published
Pi extension to generate open source license files
Maintainers
Readme
pi-gen-license
A Pi extension that generates open source license files — one command, one file.
Quick Start
# Install as a Pi extension
pi install npm:pi-gen-license
# In Pi, run:
/gen-license mitFeatures
- 9 license types — MIT, Apache 2.0, BSD 3-Clause, ISC, GPL 3.0, AGPL 3.0, LGPL 3.0, MPL 2.0, Unlicense
- Dual interface — slash command
/gen-licensefor humans, toolgenerate_licensefor LLM - Auto-detect author — reads
git config user.namewhen no name is provided - Tab completion —
/gen-license <TAB>shows available license types
Supported Licenses
| Type | License |
| --- | --- |
| mit | MIT License |
| apache-2.0 | Apache License 2.0 |
| bsd-3 | BSD 3-Clause License |
| isc | ISC License |
| gpl-3.0 | GNU General Public License v3.0 |
| agpl-3.0 | GNU Affero General Public License v3.0 |
| lgpl-3.0 | GNU Lesser General Public License v3.0 |
| mpl-2.0 | Mozilla Public License 2.0 |
| unlicense | The Unlicense |
Usage
Slash Command
/gen-license mit # MIT license, auto-detect author
/gen-license apache-2.0 hacxy # Apache 2.0, specify author
/gen-license gpl-3.0 hacxy 2024 # GPL 3.0, specify author and yearLLM Tool
Ask Pi naturally — the LLM will call generate_license automatically:
"Generate an MIT license file for this project"
Development
# Install dependencies
npm install
# Run with Pi (hot-reload)
npm run dev
# Lint & format
npm run lint
npm run format
# Type check
npm run typecheck