Giter VIP home page Giter VIP logo

nuget-license's Introduction

Nuget License Utility Build Status NuGet

A .net core tool to print the licenses of a project. This tool support .NET Core and .NET Standard Projects.

dotnet-project-licenses tool

Install tool

dotnet tool install --global dotnet-project-licenses

Uninstall tool

dotnet tool uninstall --global dotnet-project-licenses

Usage

Usage: dotnet-project-licenses [options]

Options:

Option Description
-i, --input Project Folder
--allowed-license-types Simple json file of a text array of allowable licenses, if no file is given, all are assumed allowed
-j, --json (Default: false) Saves licenses list in a json file (licenses.json)
--include-project-file (Default: false) Adds project file path to information when enabled.
-l, --log-level (Default: Error) Sets log level for output display. Options: Error,Warning,Information,Verbose.
--manual-package-information Simple json file of an array of LibraryInfo objects for manually determined packages.
--licenseurl-to-license-mappings Simple json file of Dictinary<string,string> to override default mappings
--include-transitive Include distinct transitive package licenses per project file.
-o, --output (Default: false) Saves as text file (licenses.txt)
--outfile Output filename
-f, --output-directory Set Output Directory/Folder
--projects-filter Simple json file of a text array of projects to skip. Supports Ends with matching such as 'Tests.csproj'
--proxy Set the proxy for HTTP communications.
--packages-filter Simple json file of a text array of packages to skip. Or a regular expression defined between two forward slashes '/regex/'.
-u, --unique (Default: false) Unique licenses list by Id/Version
-p, --print (Default: true) Print licenses.
--export-license-texts Exports the raw license texts
--help Display this help screen.
--version Display version information.
--ignore-ssl-certificate-errors Ignores SSL certificate errors in HttpClient.

Example tool commands

dotnet-project-licenses --help
dotnet-project-licenses -i projectFolder

Print unique licenses

Values for the input may include a folder path, a Visual Studio '.sln' file, a '.csproj' or a '.fsproj' file.

dotnet-project-licenses -i projectFolder -u

Creates output file of unique licenses in a plain text 'licenses.txt' file in current directory

dotnet-project-licenses -i projectFolder -u -o

Create output file 'new-name.txt' in another directory

dotnet-project-licenses -i projectFolder -o --outfile ../../../another/folder/new-name.txt

Creates output json file of unique licenses in a file 'licenses.json' in the current directory

dotnet-project-licenses -i projectFolder -u -o -j

Exports all license texts in the current directory

dotnet-project-licenses -i projectFolder --export-license-texts

Exports all license texts in ~/Projects/github directory and output json in ~/Projects/output.json

dotnet-project-licenses -i projectFolder -o -j -f ~/Projects/github --outfile ~/Projects/output.json --export-license-texts

Exports all license texts in the current directory excluding all Microsoft packages

dotnet-project-licenses -i projectFolder --export-license-texts --packages-filter '/Microsoft.*/'

Docker

Build the image

docker build . -t nuget-license

Run the image and export the licenses locally

docker run -it -v projectName:/tmp nuget-license -i /tmp -f /tmp --export-license-texts -l Verbose

nuget-license's People

Contributors

actuallyrob avatar alesebi91 avatar amis92 avatar bent-rasmussen avatar bmcdavid avatar denniskae avatar devproffesional avatar fjaouani avatar jmartasek avatar mersadk avatar mkuckert avatar orbus-dkreivenas avatar rafntor avatar sensslen avatar tomchavakis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.