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

bin+lib license-generator

A Command line tool that generate LICENSE file

20 releases (5 stable)

1.3.0 Sep 6, 2024
1.1.0 May 24, 2024
1.0.0 Feb 11, 2023
0.8.2 Feb 8, 2023
0.4.0 Jan 31, 2019

#436 in Command line utilities

Download history 9/week @ 2024-07-22 14/week @ 2024-07-29 16/week @ 2024-08-05 15/week @ 2024-08-12 9/week @ 2024-08-19 305/week @ 2024-08-26 200/week @ 2024-09-02 12/week @ 2024-09-09 51/week @ 2024-09-16 68/week @ 2024-09-23 49/week @ 2024-09-30 13/week @ 2024-10-07 18/week @ 2024-10-14 15/week @ 2024-10-21 19/week @ 2024-10-28 22/week @ 2024-11-04

75 downloads per month

MIT license

60KB
329 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:
  -l, --list lists the available licenses
  --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

Output to stdout

license-generator MIT --output /dev/stdout

Multi LICENSE

license-generator MIT Apache
# generates `LICENSE-MIT` and `LICENSE-APACHE`

Specify year and author

license-generator MIT --author azu --year 2024

Tests

cargo test

Releases

Use cargo-release.

cargo release --execute --publish {patch,minor,major}

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

~5MB
~85K SLoC