Linux command
licensor 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Generate MIT license
licensor MIT "[Your Name]"
Generate Apache license
licensor Apache-2.0 > LICENSE
Generate GPL license
licensor GPL-3.0
Generate license
licensor "Apache-2.0 WITH LLVM-exception" --skip-optional
List available licenses
licensor --licenses
说明
licensor writes license text to stdout given an SPDX license identifier. All licenses are compiled into the binary. If the provided ID isn't found, similar ones will be suggested. The tool outputs properly formatted license text with copyright holder and year filled in.
参数
- --licenses
- List all available SPDX license identifiers.
- --skip-optional
- Omit optional sections from the license text.
- --help
- Display help information.
FAQ
What is the licensor command used for?
licensor writes license text to stdout given an SPDX license identifier. All licenses are compiled into the binary. If the provided ID isn't found, similar ones will be suggested. The tool outputs properly formatted license text with copyright holder and year filled in.
How do I run a basic licensor example?
Run `licensor MIT "[Your Name]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --licenses do in licensor?
List all available SPDX license identifiers.