#command-line-tool #generator #license #cli

bin+lib license-generator

A Command line tool that generate LICENSE file

16 releases (1 stable)

1.0.0 Feb 11, 2023
0.8.2 Feb 8, 2023
0.8.1 Feb 4, 2022
0.8.0 Mar 18, 2021
0.4.0 Jan 31, 2019

#2113 in Command line utilities

32 downloads per month

MIT license

50KB
279 lines

license-generator Test

A Command line tool that generates LICENSE file.

Installation

Install with Cargo:

cargo install license-generator

Usage

$ license-generator --author <name> [LICENSE_TYPE]

[LICENSE_TYPE]:
- AGPL
- Apache
- CC-BY
- CC-BY-NC
- CC-BY-NC-SA
- CC-BY-SA
- CC0
- GPL
- LGPL
- MIT
- MPL
- Unlicense

Options:
  --author input author name. Default: `GitName <GitEmail>`
  --project input project name that is required by some license
  --year input license year
  --output path to the output. Default: ./LICENSE

Supported Licenses

This CLI supports the following licenses:

Examples

Generate MIT LICENSE

license-generator MIT --author "azu"

Output to stdout

license-generator MIT --output /dev/stdout --author "azu"

Multi LICENSE

license-generator MIT Apache --author "azu"
# output
# LICENSE-MIT and LICENSE-APACHE

Tests

cargo test

Releases

Use cargo-release.

cargo release --no-dev-version {patch,minor,major} --execute

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © azu

Dependencies

~4MB
~78K SLoC