create-licence
v1.0.13
Published
An interactive tool to help you choose an appropriate open source license
Maintainers
Readme
create-licence
An interactive command-line tool to help developers choose the appropriate open source license through simple questions.
Overview
This package allows you to quickly set up an open source project with the most suitable license based on your preferences. Instead of manually researching different licenses, answer a few simple questions and get a recommendation along with the actual license file.
Quick Start
npm init licenceNo installation required! This command will directly run the license recommendation tool.
Features
- Zero Installation: Run directly with
npm init licence - Intuitive Questionnaire: Simple questions to understand your licensing needs
- Multi-language Support: Available in both English and Chinese
- Automatic LICENSE Generation: Automatically creates the recommended license file
- Wide License Support: Supports 10+ popular open source licenses
How It Works
When you run npm init licence, the tool will ask you four key questions:
Usage Preferences:
- Most permissive usage (commercial/proprietary use allowed)
- Require copyright notice retention
- Stricter usage restrictions
Patent Protection:
- Whether you want explicit patent licensing
- Patent concerns importance
Derivative Works:
- Whether derivative works must remain open source
- Allowing proprietary derivatives
Copyright Handling:
- Completely waive copyright (public domain)
- Retain copyright
Based on your answers, the tool recommends the most suitable license and can automatically generate the LICENSE file in your project.
Supported Licenses
- MIT: Simple and permissive, requires only copyright notice retention
- Apache-2.0: Permissive with explicit patent grant
- GPL-3.0: Strong copyleft, requires derivative works to be open source
- BSD-3-Clause: Similar to MIT but with non-endorsement clause
- Unlicense: Dedicates work to the public domain
Requirements
- Node.js >= 14.0.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to submit issues or pull requests to improve this tool.
