license ![wercker status wercker status](https://camo.githubusercontent.com/d7d9ab79cd1f6d94c95587616871eb07b911e3adf503e479fce13725169f30f3/68747470733a2f2f6170702e776572636b65722e636f6d2f7374617475732f31343037623863373163373230333538626631356565623538313566393962642f73)
Install
go get -u github.com/nishanths/license
Create licenses from the command-line.
- Supports all the licenses available on GitHub
- Does not need network access (except on first run)
- Good defaults for name and year on the license; easy to customize when needed
Usage
Generate a license
To print a license to stdout, run license
followed by the license name:
license mit
Save to file
Use the -o
flag to save the license to a file:
license -o LICENSE.txt mit
Customize name and year
license -year=2013 -name=Alice isc
If unspecified, the current year is used.
To determine the name, license uses the following in order. Since you likely have your name set in .gitconfig
, you can always omit the -name
flags.
- command line flags: -name, -n
- environment variable: LICENSE_FULL_NAME
- gitconfig and hgconfig
- "os/user".Current()
- empty string
Authentication
If you receive a 403 Forbidden: API rate limit exceeded
while updating licenses, use your GitHub username and a personal access token (no scopes required).
license -auth username:e0a8a01b1f125a785ea3d7ada98eb6a018e2fe4f -update
(The token above will not work.)
More docs
Help is available by runnning license -help
View the list of available licenses by running license -list
Contributing
Pull requests for new features, bug fixes, and suggestions are welcome!