license

wercker status

Create licenses for your open-source projects from the command-line. Hello, productivity!

What is license?

license is a command-line utility to make licenses.

Features

  • Supports all the licenses available on GitHub
  • Does not need network access (except on first run)
  • Always up-to-date with the licenses in GitHub's API
  • Easy to customize the name, year, and output filename when needed

Demo

Install

Using go

$ go get github.com/nishanths/license

More info

Download

Alternatively, download the binary for your platform.

Usage

Generate a license

To generate a license, simply run license followed by the license name. The following command generates the MIT license:

$ license mit

Create a license file

Use the -o option to save the license to a file. For example, the following command creates the file LICENSE.txt with the contents of the ISC license:

$ license -o LICENSE.txt isc

More options and commands are described below.

Options

Customize name and year on the license

By default, license uses the current year for the year on the generated license. To determine the name, license uses the following algorithm:

  • First, it looks at provided command-line arguments
  • If command-line args are absent, it looks at the environment variable LICENSE_FULL_NAME
  • Finally, it uses the name from git config and mercurial config

The default ouput is suitable in most cases, but can also explicitly specify the name and year:

$ license --name Alice --year 2013 mit

List available licenses

View the list of locally avaialable licenses by running:

$ license ls

The equivalent command to list remote licenses is:

$ license ls-remote

Currently available list of licenses

Help

Help text is available by running license --help. View help command output

Contributing

Pull requests for new features, bug fixes, and suggestions are welcome!

License

Licensed under the MIT License.

The license file in this repo was generated by this program :).

Built With

Share this project:
×

Updates