{"id":15011607,"url":"https://github.com/tomchavakis/nuget-license","last_synced_at":"2025-05-14T12:13:16.943Z","repository":{"id":34229498,"uuid":"171835914","full_name":"tomchavakis/nuget-license","owner":"tomchavakis","description":".NET Core tool to print or save all the licenses of a project","archived":false,"fork":false,"pushed_at":"2025-03-14T17:54:34.000Z","size":629,"stargazers_count":284,"open_issues_count":32,"forks_count":85,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T21:32:27.747Z","etag":null,"topics":["dotnet","license-management","nuget"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomchavakis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-21T08:57:22.000Z","updated_at":"2025-03-26T08:42:57.000Z","dependencies_parsed_at":"2024-05-22T06:33:58.966Z","dependency_job_id":"c00789fc-7d14-4fab-9b2c-8f122fdbcda8","html_url":"https://github.com/tomchavakis/nuget-license","commit_stats":{"total_commits":127,"total_committers":29,"mean_commits":4.379310344827586,"dds":0.4881889763779528,"last_synced_commit":"dcc6c183062fa1a5e3100e9a3f46bca16613ffa7"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchavakis%2Fnuget-license","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchavakis%2Fnuget-license/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchavakis%2Fnuget-license/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchavakis%2Fnuget-license/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomchavakis","download_url":"https://codeload.github.com/tomchavakis/nuget-license/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140769,"owners_count":22021220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","license-management","nuget"],"created_at":"2024-09-24T19:41:20.136Z","updated_at":"2025-05-14T12:13:11.932Z","avatar_url":"https://github.com/tomchavakis.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuget License Utility [![Build Status](https://travis-ci.com/tomchavakis/nuget-license.svg?branch=develop)](https://travis-ci.com/tomchavakis/nuget-license.svg?branch=develop) [![NuGet](https://img.shields.io/nuget/v/dotnet-project-licenses.svg)](https://www.nuget.org/packages/dotnet-project-licenses)\n\n\u003e :warning: **This project seems to be abandoned**: The original author of this project has not shown up in quite some while. Therefore it's impossible to move forward with it (even though there are people that do have write access to the repository. There has been a rewrite of the project that provides similar functionality. Please check it out here: https://github.com/sensslen/nuget-license.\n\nA .net core tool to print the licenses of a project. This tool support .NET Core and .NET Standard Projects.\n\n## dotnet-project-licenses tool\n\n### Install tool\n\n```ps\ndotnet tool install --global dotnet-project-licenses\n\n```\n\n### Uninstall tool\n\n```ps\ndotnet tool uninstall --global dotnet-project-licenses\n```\n\n## Usage\n\nUsage: dotnet-project-licenses [options]\n\n**Options:**\n\u003ctable\u003e\n  \u003ctr\u003e\u003ctd width=\"30%\"\u003eOption\u003c/td\u003e\u003ctd width=\"70%\"\u003eDescription\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -i, --input \u003c/td\u003e\u003ctd\u003eProject Folder\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -o, --output \u003c/td\u003e\u003ctd\u003e(Default: false) Save as text file (licenses.txt)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --outfile \u003c/td\u003e\u003ctd\u003eOutput filename\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -f, --output-directory \u003c/td\u003e\u003ctd\u003eOutput Directory/Folder\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -j, --json \u003c/td\u003e\u003ctd\u003e(Default: false) Save licenses list in a json file (licenses.json)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -m, --md \u003c/td\u003e\u003ctd\u003e(Default: false) Save licenses list in a markdown file (licenses.md)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --include-project-file \u003c/td\u003e\u003ctd\u003e(Default: false) Add project file path to information when enabled\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -l, --log-level \u003c/td\u003e\u003ctd\u003e(Default: Error) Set log level for output display. Options: Error,Warning,Information,Verbose\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --allowed-license-types \u003c/td\u003e\u003ctd\u003eSimple json file of a text array of allowable licenses, if no file is given, all are assumed allowed. Cannot be used alongside 'forbidden-license-types'.\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --forbidden-license-types \u003c/td\u003e\u003ctd\u003eSimple json file of a text array of forbidden licenses, if no file is given, none are assumed forbidden. Cannot be used alongside 'allowed-license-types'.\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --manual-package-information\u003c/td\u003e\u003ctd\u003eSimple json file of an array of LibraryInfo objects for manually determined packages\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --licenseurl-to-license-mappings\u003c/td\u003e\u003ctd\u003eSimple json file of Dictionary\u003cstring,string\u003e to override default mappings\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -t, --include-transitive \u003c/td\u003e\u003ctd\u003eInclude distinct transitive package licenses per project file\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --use-project-assets-json \u003c/td\u003e\u003ctd\u003eUse the resolved project.assets.json file for each project as the source of package information. Requires the \u003ccode\u003e-t\u003c/code\u003e option since this always includes transitive.references. Requires \u003ccode\u003enuget restore\u003c/code\u003e or \u003ccode\u003edotnet restore\u003c/code\u003e to be run first\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --projects-filter \u003c/td\u003e\u003ctd\u003eSimple json file of a text array of projects to skip. Supports Ends with matching such as 'Tests.csproj, Tests.vbproj, Tests.fsproj'\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --packages-filter \u003c/td\u003e\u003ctd\u003eSimple json file of a text array of packages to skip. Or a regular expression defined between two forward slashes \u003ccode\u003e'/regex/'\u003c/code\u003e or two hashes \u003ccode\u003e'#regex#'\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -u, --unique \u003c/td\u003e\u003ctd\u003e(Default: false) Unique licenses list by Id/Version\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -p, --print \u003c/td\u003e\u003ctd\u003e(Default: true) Print licenses\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -e, --export-license-texts \u003c/td\u003e\u003ctd\u003eExport the raw license texts\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e -c, --convert-html-to-text \u003c/td\u003e\u003ctd\u003eStrip HTML tags if the license file is HTML and save as plain text (EXPERIMENTAL)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --help \u003c/td\u003e\u003ctd\u003eDisplay this help screen\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --version \u003c/td\u003e\u003ctd\u003eDisplay version information\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --ignore-ssl-certificate-errors \u003c/td\u003e\u003ctd\u003eIgnore SSL certificate errors in HttpClient\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --timeout \u003c/td\u003e\u003ctd\u003eSet HttpClient timeout in seconds\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --proxy-url \u003c/td\u003e\u003ctd\u003eSet a proxy server URL to be used by HttpClient\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003e --proxy-system-auth \u003c/td\u003e\u003ctd\u003eUse the system credentials for proxy authentication\u003c/td\u003e\u003c/tr\u003e  \n\u003c/table\u003e\n\n## Example tool commands\n\n```ps\ndotnet-project-licenses --help\n```\n\n```ps\ndotnet-project-licenses -i projectFolder\n```\n\n### Print unique licenses\n\nValues for the input may include a folder path, a Visual Studio '.sln' file, a '.csproj' or a '.fsproj' file or a '.vbproj' file or the 'Directory.Build.props' file.\n\n```ps\ndotnet-project-licenses -i projectFolder -u\n```\n\n### Creates output file of unique licenses in a plain text 'licenses.txt' file in current directory\n\n```ps\ndotnet-project-licenses -i projectFolder -u -o\n```\n\n### Create output file 'new-name.txt' in another directory\n\n```ps\ndotnet-project-licenses -i projectFolder -o --outfile ../../../another/folder/new-name.txt\n```\n\n### Creates output json file of unique licenses in a file 'licenses.json' in the current directory\n\n```ps\ndotnet-project-licenses -i projectFolder -u -o -j\n```\n\n### Exports all license texts in the current directory\n\n```ps\ndotnet-project-licenses -i projectFolder --export-license-texts\n```\n\n### Exports all license texts in ~/Projects/github directory and output json in ~/Projects/output.json\n\n```ps\ndotnet-project-licenses -i projectFolder -o -j -f ~/Projects/github --outfile ~/Projects/output.json --export-license-texts\n```\n\n### Exports all license texts in the current directory excluding all Microsoft packages. Licenses in HTML format are saved as plain text files.\n\n```ps\ndotnet-project-licenses -i projectFolder --export-license-texts --convert-html-to-text --packages-filter '/Microsoft.*/'\n```\n\n### Prints licenses used by a compiled solution excluding all System packages\n```ps\ndotnet-project-licenses -i projectSolution.sln --use-project-assets-json --packages-filter '#System\\..*#'\n```\n\n### Use a proxy server when getting nuget package information via http requests\n\n```ps\ndotnet-project-licenses -i projectFolder --proxy-url \"http://my.proxy.com:8080\"\n```\n\n### Use a proxy server requiring authentication with the system credentials\n\n```ps\ndotnet-project-licenses -i projectFolder --proxy-url \"http://my.proxy.com:8080\" --proxy-system-auth\n```\n\n\n## Docker\n\n### Build the image\n```\ndocker build . -t nuget-license\n```\n### Run the image and export the licenses locally\n```\ndocker run -it -v projectPath:/tmp nuget-license -i /tmp -f /tmp --export-license-texts -l Verbose\n\nwhere projectPath is the path of the project that you want to export the licenses. \nYou can also add the command parameters of the tool.\n\nex.\ndocker run -it -v ~/Projects/github/nuget-license:/tmp nuget-license -i /tmp -o --export-license-texts -l Verbose\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomchavakis%2Fnuget-license","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomchavakis%2Fnuget-license","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomchavakis%2Fnuget-license/lists"}