@lowdep/license-gen
v1.0.0
Published
Generate a LICENSE file (MIT, Apache-2.0, BSD, ISC, 0BSD, Unlicense) with author/year filled in — fully offline, zero dependencies
Maintainers
Readme
license-gen
Generate a LICENSE file from your terminal — fully offline. Fills in the copyright holder and year automatically (from your git config), and bundles the full text of the most common open-source licenses. Zero dependencies.
No network call, no API, no dependency tree — just the license text written to disk.
Install
npm install -g license-genOr without installing:
npx license-gen mitUsage
license-gen mit # MIT, author auto-detected from git
license-gen apache-2.0 -n "Jane Doe" # Override the name
license-gen isc -y 2024 # Override the year
license-gen mit --stdout # Preview without writing
license-gen mit --force # Overwrite an existing LICENSE
license-gen --list # List available licensesExample
$ license-gen mit
✓ Created LICENSE (MIT)
Copyright (c) 2026 Jane DoeThe author name is resolved in this order:
--nameflaggit config user.namepackage.json→author- your OS username
Available Licenses
| Key | License | SPDX |
|---|---|---|
| mit | MIT License | MIT |
| apache-2.0 | Apache License 2.0 | Apache-2.0 |
| bsd-2-clause | BSD 2-Clause | BSD-2-Clause |
| bsd-3-clause | BSD 3-Clause | BSD-3-Clause |
| isc | ISC License | ISC |
| 0bsd | BSD Zero Clause | 0BSD |
| unlicense | The Unlicense | Unlicense |
Aliases: apache → apache-2.0, bsd → bsd-3-clause, bsd2, bsd3.
Not sure which to pick? See choosealicense.com. For most small open-source projects, MIT is the conventional choice.
Options
| Flag | Description |
|---|---|
| -n, --name <name> | Copyright holder |
| -y, --year <year> | Copyright year (default: current) |
| -o, --out <file> | Output file (default: LICENSE) |
| --stdout | Print to stdout instead of writing |
| --force | Overwrite an existing file |
| -l, --list | List available licenses |
License
MIT
Keywords
license generator · generate license · mit license · apache license · choose a license · license file · open source license · spdx · offline · zero dependencies
Built to solve, shared to help — Rushabh Shah 🛠️✨
One of 40+ zero-dependency developer CLI tools — no node_modules, ever.
