Skip to content

anth0nycodes/license-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Generator

Interactive CLI tool to quickly generate open-source licenses for your projects.

demo

NPM Downloads

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-generator

Usage

Interactive Mode (Default)

generate-license

Select 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 -q

Set Default License

generate-license --sl <license-key>

# Example:
generate-license --sl mit

Set Default Author

generate-license --sa <author>

# Example:
generate-license --sa "anth0nycodes"

List Available Licenses

generate-license --ls

Show License Information

View detailed information about a specific license:

generate-license -i <license-key>

# Example:
generate-license -i mit

Show Config

Display your current configuration settings:

generate-license --sc

Reset Config

Reset your configuration to default (clears saved license and author):

generate-license --rc

Supported 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 start

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

For detailed guidelines on how to contribute, please see our Contributing Guide.

Links

About

A CLI tool to generate licences for your repository

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •