Interactive CLI tool to quickly generate open-source licenses for your projects.
- Interactive license selection from GitHub's license API
- Automatic copyright holder and year detection from git config
- Beautiful terminal UI with overwrite protection
npm install -g @anth0nycodes/license-generatorgenerate-licenseSelect a license, enter copyright holder (defaults to git username) and year (defaults to current year), then confirm.
Generate a license instantly using saved defaults:
generate-license -qgenerate-license --sl <license-key>
# Example:
generate-license --sl mitgenerate-license --sa <author>
# Example:
generate-license --sa "anth0nycodes"generate-license --lsView detailed information about a specific license:
generate-license -i <license-key>
# Example:
generate-license -i mitDisplay your current configuration settings:
generate-license --scReset your configuration to default (clears saved license and author):
generate-license --rcThis tool uses the GitHub Licenses API, which includes:
- GNU Affero General Public License v3.0
- Apache License 2.0
- BSD 2-Clause "Simplified" License
- BSD 3-Clause "New" or "Revised" License
- Boost Software License 1.0
- Creative Commons Zero v1.0 Universal
- Eclipse Public License 2.0
- GNU General Public License v2.0
- GNU General Public License v3.0
- GNU Lesser General Public License v2.1
- MIT License
- Mozilla Public License 2.0
- The Unlicense
- Node.js 20.x or higher
- Git
# Clone the repository
git clone https://github.com/anth0nycodes/license-generator.git
cd license-generator
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build
pnpm build
# Run built version
pnpm startContributions are welcome! Please feel free to submit a Pull Request.
For detailed guidelines on how to contribute, please see our Contributing Guide.
