licenser
A CLI for choosing and generating software license files. Uses data from choosealicense.com.
Why
My usual flow was tedious:
- Open choosealicense.com
- Find the license I want
wget it or copy-paste into the repo
- Edit placeholders by hand
There's an existing CLI (choosealicense-cli) but it looked unmaintained and was missing features I wanted. So I wrote this.
Demo

Install
Requires Go 1.25+
go install github.com/devadathanmb/licenser@latest
Or build from source:
# Clone the repository
git clone https://github.com/devadathanmb/licenser.git
# Navigate and build the project
cd licenser && make build
# Run the binary
./licenser --help
Usage
Running licenser with no arguments in a TTY launches an interactive wizard.
For non-interactive use:
# list all available licenses
licenser list
# show details for a specific license
licenser info mit
# search by rules (permissions, conditions, limitations)
licenser search --permits patent-use --no-requires disclose-source
# compare licenses side by side (2 or 3)
licenser compare mit apache-2.0
# generate a LICENSE file
# author, email, year, and project are auto-detected from git config when available
licenser generate mit --author "Jane Doe" --year 2026
# refresh local license data
licenser update
Commands
| Command |
Description |
list |
List all available licenses |
info <license> |
Show metadata and text for a license |
search |
Filter licenses by permissions / conditions / limitations |
compare <l1> <l2> [l3] |
Side-by-side comparison of 2 or 3 licenses |
generate <license> |
Write a LICENSE file with placeholders filled in |
update |
Refresh cached license data |
completion |
Generate shell completion scripts |
list, info, search, and compare support --json for scripting.
generate flags: --author, --email, --year, --project, -o/--output, --stdout, -f/--force
search flags: --permits, --requires, --forbids, --no-requires
Development
make build # build binary → ./licenser
make test # run all tests with race detection
make fmt # check formatting (gofmt -s)
make vet # run go vet
make lint # fmt + vet + golangci-lint (if installed)
Credits
Not legal advice. And yes, this repo's own LICENSE was generated using this tool.