• Stars
    star
    664
  • Rank 67,903 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line license text generator.

license is a command line tool to create LICENSE files.

It provides good defaults for name, year and project name on license (customizable if needed), and it supports all license types listed on the GitHub Licenses API and a few more. The license templates used by this program were copied from the GitHub Licenses API, when available.

afl-3.0       (Academic Free License)
agpl-3.0      (GNU Affero General Public License v3.0)
al-2.0        (Artistic License 2.0)
apache-2.0    (Apache License 2.0)
bsd-0-clause  (BSD Zero Clause License)
bsd-2-clause  (BSD 2-Clause "Simplified" License)
bsd-3-clause  (BSD 3-Clause "New" or "Revised" License)
bsd-4-clause  (BSD 4-clause "Original" or "Old" License)
cc-by-4.0     (CC-BY 4.0 International Public License)
cc-by-sa-4.0  (CC-BY-SA 4.0 International Public License)
cc0-1.0       (Creative Commons Zero v1.0 Universal)
ecl-2.0       (Educational Community License 2.0)
epl-2.0       (Eclipse Public License 2.0)
eupl-1.2      (European Union Public Licence 1.2)
free-art-1.3  (Free Art License 1.3)
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)
lppl          (LaTeX Project Public License)
mit           (MIT License)
mit-0         (MIT No Attribution)
mpl-2.0       (Mozilla Public License 2.0)
ms-pl         (Microsoft Public License)
ms-rl         (Microsoft Reciprocal License)
mulanpsl-2.0  (木兰宽松许可证 第2版)
odbl-1.0      (ODC Open Database License 1.0)
ofl-1.1       (SIL OPEN FONT LICENSE Version 1.1)
osl-3.0       (Open Software License v3.0)
unlicense     (The Unlicense)
wtfpl         (Do What The Fuck You Want To Public License)
zlib          (zlib License)

Install

Building from Source

With Go 1.16 or higher:

go install github.com/nishanths/license/v5@latest

Via the Arch User Repository (AUR)

This program is available via the AUR under the name nishanths-license-git. Using yay, you can install it like so:

WARNING: The authenticity of this method was last verified on 2021-07-04 by the maintainer(s) of the license project. Please verify before use.

yay -S nishanths-license-git

Usage

Print license

To print a license to stdout, run the license command followed by the license name:

$ license mit

Save to file

Use the -o flag to save the license to a file, or use your shell's redirection operator:

$ license -o LICENSE.txt mit
$ license mit > LICENSE.txt

Customize name, year and project name

$ license -year 2013 -name "Alice L" isc
$ license -name "Alice L" -year 2022 -project "myapp" bsd-4-clause

The current year is used if -year is omitted.

The current folder is used as the project name if -project is omitted.

To determine the name on the license, the following are used in this order:

- command line flags: -name, -n
- environment variable: LICENSE_FULL_NAME
- gitconfig and hgconfig
- "os/user".Current()
- empty string

If you have your name set in $HOME/.gitconfig, you can almost always omit the -name flag.

Demo

Demonstration

Contributing

Pull requests for new features, bug fixes, and suggestions are welcome! Please create an issue for discussion before working on a substantial change.

License

MIT

More Repositories

1

zoom.js

Fork of fat/zoom.js with improvements
TypeScript
1,348
star
2

cocoa-hugo-theme

Responsive Hugo blog theme (note: not actively worked on)
CSS
326
star
3

exhaustive

Check exhaustiveness of switch statements of enum-like constants in Go source code.
Go
296
star
4

go-xkcd

xkcd.com API client in Go
Go
51
star
5

lyft

Create and manage Lyft rides from the command line
Go
36
star
6

predeclared

Find declarations in Go source code that shadow predeclared identifiers
Go
28
star
7

loupe-js

Image magnifier written in TypeScript; works with touch events and supports React
TypeScript
20
star
8

slack-texts

SMS notifications for Slack groups
JavaScript
19
star
9

dedupimport

Deduplicate named and unnamed imports of the same import path in Go files
Go
18
star
10

youtube-pause-chrome

Properly pause YouTube with spacebar
JavaScript
16
star
11

YWeatherAPI

Yahoo Weather API wrapper for iOS and Mac
Objective-C
16
star
12

rust-haikunator

Rust
16
star
13

scrobble

Apple Music scrobbling with beautiful album artwork.
Go
10
star
14

what-s-playing

Firefox extension: Desktop notifications for music websites
JavaScript
7
star
15

block-urls

Firefox WebExtension to block exact URLs
JavaScript
4
star
16

QuickCal

Chrome extension: Single-click event adding to Google Calendar
JavaScript
4
star
17

nishanths.github.io

Website + writing with Jekyll (see 'source' branch for old code).
CSS
4
star
18

lyft-go

Go client for Lyft's v1 HTTP API
Go
3
star
19

metaimport

Generate HTML pages with <meta> tags for custom Go import paths
Go
3
star
20

print-instacart

Make a decent PDF of an Instacart order
TypeScript
2
star
21

redditgold

Gold features such as new comment highlighting
JavaScript
2
star
22

godoc-goos-goarch

Easily switch GOOS and GOARCH params on godoc.org
HTML
2
star
23

fullstory

Go client for the FullStory API
Go
1
star
24

albumday

“Album Birthdays!” app source code
Go
1
star
25

unusedargs

See instead: https://github.com/mvdan/unparam
Go
1
star
26

fmap

Generate a map[string][]byte of directory contents
Go
1
star
27

iterators.js

Iterators for node and the browser
JavaScript
1
star
28

spitfire-live

A real-time, personal lyrics assistant (winning project @HackTX 2015)
HTML
1
star
29

auto-browser

Automate the browser based on natural actions – Top 10 @HackTX 2014
JavaScript
1
star
30

impl

Find types that implement an interface
Go
1
star
31

chp

Common Go channel patterns implemented with type parameters.
Go
1
star