Generate LICENSE files from the command line. MIT, Apache, GPL, BSD, ISC, MPL, Unlicense — one command.
Every open-source project needs a LICENSE file, but nobody wants to manually copy-paste legal text and fill in the year and author name. license-maker generates a correct, complete LICENSE file in one command — with zero dependencies.
npm install -g license-makerOr use directly without installing:
npx license-maker mit# Generate MIT license (auto-detects name from git config)
license-maker mit
# Specify author name
license-maker apache-2.0 --name "Jane Doe"
# Output to custom file
license-maker gpl-3.0 --output LICENSE.md
# Print to stdout (pipe to clipboard)
license-maker mit --stdout | pbcopy # macOS
license-maker mit --stdout | xclip # Linux
# List all available licenses
license-maker --list| License | Command | Permissive? | Patent Grant? |
|---|---|---|---|
| MIT | license-maker mit |
✅ | ❌ |
| Apache 2.0 | license-maker apache-2.0 |
✅ | ✅ |
| GPL 3.0 | license-maker gpl-3.0 |
❌ (copyleft) | ✅ |
| BSD 2-Clause | license-maker bsd-2 |
✅ | ❌ |
| BSD 3-Clause | license-maker bsd-3 |
✅ | ❌ |
| ISC | license-maker isc |
✅ | ❌ |
| MPL 2.0 | license-maker mpl-2.0 |
Partial | ✅ |
| Unlicense | license-maker unlicense |
✅ (public domain) | N/A |
- MIT — Maximum freedom, minimal restrictions. Most popular on npm.
- Apache 2.0 — Like MIT but includes patent protection. Good for corporate use.
- GPL 3.0 — Requires derivative works to also be open source.
- ISC — Functionally identical to MIT, slightly shorter text.
- Unlicense — Public domain dedication. No restrictions at all.
- 📦 Zero dependencies — just Node.js built-ins
- 🔍 Auto-detects author from
git config user.name - 📅 Auto-fills year — always current
- 🖨️ Pipe to stdout with
--stdout - 🎨 Colorful terminal output — clear success/error messages
- ⚡ Instant — no network requests, no config files
mkdir my-project && cd my-project
npm init -y
license-maker mit
# LICENSE file created with your name and current year ✓# GitHub Actions: ensure LICENSE exists
- name: Generate license if missing
run: |
if [ ! -f LICENSE ]; then
npx license-maker mit --name "${{ github.repository_owner }}"
fifor dir in packages/*/; do
(cd "$dir" && npx license-maker mit)
done#!/bin/bash
mkdir "$1" && cd "$1"
npm init -y
npx license-maker mit
git init
echo "node_modules" > .gitignore
echo "# $1" > README.md| Flag | Description |
|---|---|
--name <name> |
Author name (default: git config user.name) |
--output <file> |
Output file path (default: LICENSE) |
--stdout |
Print to stdout instead of writing a file |
--list |
List all available license types |
--help |
Show help message |
| Feature | license-maker | choosealicense.com | license-generator | manual copy-paste |
|---|---|---|---|---|
| CLI one-liner | ✅ | ❌ | ✅ | ❌ |
| Zero dependencies | ✅ | N/A | ❌ | N/A |
| Auto-detect author | ✅ | ❌ | ✅ | ❌ |
| Auto-fill year | ✅ | ❌ | ✅ | ❌ |
| Works offline | ✅ | ❌ | ✅ | ✅ |
| npx support | ✅ | N/A | ✅ | N/A |
| 8 license types | ✅ | ✅ | ✅ | ✅ |
Part of a zero-dependency CLI toolkit:
- commitwiz-ai — AI-powered git commit messages
- npm-name-check — Check npm package name availability
- dep-size — Check npm package install size before installing
- env-lint-cli — Validate .env files against .env.example
MIT © kszongic