Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

license

> 编程语言
Open source

Command line license text generator.

681 stars0 likes1 views
WebsiteGitHub

About

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.

…

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.

bash
yay -S nishanths-license-git

Usage

Print license

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

bash
$ license mit

Save to file

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

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

Customize name, year and project name

bash
$ 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

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言