license is a command line tool which allows you to download open source licenses from osl.kevin.codes. The project uses Goreleaser to cross-compile binaries for all kinds of operating systems and architectures, including Microsoft Windows, MacOS, and various Linux distributions. A full list of all binaries can be found in the release archive on GitHub
license is straightforward. Once it has been installed as described on GitHub it can be used from a terminal as
$ license command.
Download a license
If you want to download the MIT license, type
license get MIT and the MIT license will be downloaded to the current directory. The output file is named
LICENSE without a file extension. To add a file extension use
license get -f md MIT and the file will be saved as
license help for a full list of all commands.
The license data is downloaded from osl.kevin.codes, which is a fork of the choosealicense.com project by GitHub. choosealicense.com is a Jekyll based website that helps developers choosing licenses by providing information on each license. I forked the repository and re-wrote the templates so that each page returns JSON which is then consumed by my Go script.