Giter Site home page Giter Site logo

license's Introduction

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

Homebrew:

brew update
brew tap nishanths/tap
brew install nishanths/tap/license

Using go: go get -u github.com/nishanths/license (more info)

Binary: get the binary for your platform here.

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 on the generated license. To determine the name, license uses the following algorithm:

  • First, it looks for command-line arguments
  • If command-line args are absent, it looks at the environment variable LICENSE_FULL_NAME
  • It then tries the name from git config and mercurial config
  • Finally, it uses the current user's name via os/user
  • As a last resort, it falls back to an empty string

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 :).

license's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.