Niche Portobello Mushroom
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

licenser

0.9.7 • Public • Published

========================
== LICENSE GENERATOR ==
========================

Choosing an OSS license doesn’t need to be scary...
Visit: http://choosealicense.com/

Installation

$ npm install -g licenser

Usage

In your project directory root:

# Create or overwrite LICENSE file from package.json or from `licenser config`
$ licenser set

# Create or overwrite LICENSE file and update package.json
$ licenser set apache2
$ licenser set mit
$ licenser set gpl3

# Update the year in the LICENSE file
$ licenser update

Config

If a package.json is present at the working directory, author, project and license information is read from there.
If not, author information is read from ~/.gitconfig

Your default license and author data can be set globally:

$ licenser config --author="Mr. Fancy Pants" --email="fp@adventure.com"
$ licenser config --default-name="LICENSE.txt" --license=CC-BY-NC-4.0

# To overwrite the package.json and file with the `licenser config` values  
# ATTN: Does not overwrite author(s) in package.json  
$ licenser set -g

You can also edit config.json directly.

Other Commands

The command line parameters are parsed by nomnom, so you can use licenser -h for information about the available commands and also licenser set -h for help on a specific command.

# Find you a license
$ licenser list -v # Verbose output for the most commonly used licenses
$ licenser list -c # Creative Commons licenses
$ licenser list open --osi # All OSI approved licenses matching 'open'

# Output license text to console
$ licenser print gpl3
$ licenser print gpl3 --header # Print the "HOW TO APPLY THESE TERMS" header

install

npm i licenser

Downloadsweekly downloads

8

version

0.9.7

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar