A CLI tool that adds a license header on top of each source file of a directory.
If you have .NET Core (version 3 or above) installed, you can install this package as a tool:
dotnet tool install --global AddLicenseHeader
If you do not have .NET Core installed, you can download a binary file from the releases section.
addlh -h|-l /path/to/license/header -d|-s /path/to/source/directory
addlh -h ../MIT.txt -s ./src/app
or,
addlh -d ./tests -l ./GPL-2.txt
This tool currently works for the following languages:
- C# (.cs)
- JavaScript, TypeScript (.js, .jsx, .ts, .tsx)
- Python (.py)
- C, C++ (.c, .cc, .cpp. .h)
The license header file has to be present on the disk.