license

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2015 License: MIT Imports: 7 Imported by: 0

README

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 from the comfort of your terminal.

Features
  • Supports all the licenses available on GitHub
  • Does not need network access (except on first run)
  • Updates itself to the latest licenses in GitHub's API when possible
  • 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 you 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

Current list of licenses:

    agpl-3.0      (GNU Affero General Public License v3.0)
    apache-2.0    (Apache License 2.0)
    artistic-2.0  (Artistic License 2.0)
    bsd-2-clause  (BSD 2-clause "Simplified" License)
    bsd-3-clause  (BSD 3-clause "New" or "Revised" License)
    cc0-1.0       (Creative Commons Zero v1.0 Universal)
    epl-1.0       (Eclipse Public License 1.0)
    gpl-2.0       (GNU General Public License v2.0)
    gpl-3.0       (GNU General Public License v3.0)
    isc           (ISC License)
    lgpl-2.1      (GNU Lesser General Public License v2.1)
    lgpl-3.0      (GNU Lesser General Public License v3.0)
    mit           (MIT License)
    mpl-2.0       (Mozilla Public License 2.0)
    unlicense     (The Unlicense)
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 :).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL