@anth0nycodes/license-generator
v0.4.1
Published
An open-source CLI tool to generate licenses for your repository.
Maintainers
Readme
License Generator
Interactive CLI tool to quickly generate open-source licenses for your projects.

Features
- Interactive license selection from GitHub's license API
- Automatic copyright holder and year detection from git config
- Beautiful terminal UI with overwrite protection
Installation
npm install -g @anth0nycodes/license-generatorUsage
Interactive Mode (Default)
generate-licenseSelect a license, enter copyright holder (defaults to git username) and year (defaults to current year), then confirm.
Options
Quick Mode
Generate a license instantly using saved defaults:
generate-license -qSet Default License
generate-license --sl <license-key>
# Example:
generate-license --sl mitSet Default Author
generate-license --sa <author>
# Example:
generate-license --sa "anth0nycodes"List Available Licenses
generate-license --lsShow License Information
View detailed information about a specific license:
generate-license -i <license-key>
# Example:
generate-license -i mitShow Config
Display your current configuration settings:
generate-license --scReset Config
Reset your configuration to default (clears saved license and author):
generate-license --rcSupported Licenses
This 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
Requirements
- Node.js 20.x or higher
- Git
Development
# 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 startContributing
Contributions are welcome! Please feel free to submit a Pull Request.
For detailed guidelines on how to contribute, please see our Contributing Guide.
