{"id":20348485,"url":"https://github.com/onebeyond/license-checker","last_synced_at":"2025-04-12T01:14:53.092Z","repository":{"id":40265040,"uuid":"348742350","full_name":"onebeyond/license-checker","owner":"onebeyond","description":":detective: Audit your NPM dependencies and reject any forbidden license.","archived":false,"fork":false,"pushed_at":"2023-11-07T12:42:56.000Z","size":790,"stargazers_count":21,"open_issues_count":18,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-12T01:14:47.443Z","etag":null,"topics":["dependencies","hacktoberfest","license"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@onebeyond/license-checker","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onebeyond.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-03-17T14:36:04.000Z","updated_at":"2025-02-28T17:44:22.000Z","dependencies_parsed_at":"2024-06-21T13:07:41.208Z","dependency_job_id":"a17eab6d-a164-4d77-854e-82ca3ef53dc0","html_url":"https://github.com/onebeyond/license-checker","commit_stats":null,"previous_names":["guidesmiths/license-checker"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Flicense-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Flicense-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Flicense-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Flicense-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onebeyond","download_url":"https://codeload.github.com/onebeyond/license-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501861,"owners_count":21114684,"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":["dependencies","hacktoberfest","license"],"created_at":"2024-11-14T22:20:40.674Z","updated_at":"2025-04-12T01:14:53.071Z","avatar_url":"https://github.com/onebeyond.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"display:flex; align-items:center; justify-content:center\"\u003e\n  \u003cimg alt=\"logo\" src=\"./assets/banner-with-border.svg\" width=\"100%\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@onebeyond/license-checker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@onebeyond/license-checker.svg?style=flat-square\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@onebeyond/license-checker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@onebeyond/license-checker.svg?style=flat-square\" alt=\"npm downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/onebeyond/license-checker/actions/workflows/run-tests.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/onebeyond/license-checker/actions/workflows/run-tests.yml/badge.svg\" alt=\"run-tests workflow\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/onebeyond/license-checker/actions/workflows/release-and-publish.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/onebeyond/license-checker/actions/workflows/release-and-publish.yml/badge.svg\" alt=\"release-and-publish workflow\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/onebeyond/license-checker/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/b82d888950f7f1b3f6a7/maintainability\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/onebeyond/license-checker/test_coverage\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/b82d888950f7f1b3f6a7/test_coverage\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://socket.dev/npm/package/@onebeyond/license-checker\" target=\"_blank\"\u003e\u003cimg src=\"https://socket.dev/api/badge/npm/package/@onebeyond/license-checker\" alt=\"socket.dev\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/github/all-contributors/onebeyond/license-checker?color=ee8449\u0026style=flat-square\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/all-contributors/onebeyond/license-checker?color=ee8449\u0026style=flat-square\" alt=\"all-contributors\" /\u003e\u003c/a\u003e\n\n\u003c/p\u003e\n\n🕵️ Audit your NPM dependencies and reject any forbidden license.\n\nCheck our [wiki](https://github.com/onebeyond/license-checker/wiki)!\n\n## 📝 Description\n\nThis package allows you to do a quick audit on your NPM dependencies by adding it in your hooks.\n\nYou can optionally add options to exclude generating the report or avoid generating the error report in case a forbidden license is found (see more details [here](#options)).\n\nThe package provides two commands:\n\n| Command | Description |\n|---|----|\n| scan | (default command) scan licenses of a project looking for forbidden licenses |\n| check | check if a license is SPDX compliant |\n\n## 🔎 How to use it in your project\n\n- Install the package\n\n```sh\nnpm install @onebeyond/license-checker\n```\n\n### `check` command\n\nJust run the check command with the license expression you want to check against SPDX:\n\n```sh\nnpx @onebeyond/license-checker check \u003clicense\u003e\n```\n\nThe process will fail if _license_ is not SPDX compliant. \n\n### `scan` command\n\n- Add a script to run the package\n\n```sh\nnpx @onebeyond/license-checker scan --failOn \u003clicense\u003e\n```\n\n- If you are using **yarn** you may want to run it from the node modules instead of using npx\n\n```sh\nnode_modules/.bin/license-checker scan --failOn \u003clicense\u003e\n```\n\n- Use the script wherever you want (husky hook, in your CI/CD pipeline, ...)\n\n#### 🚩 \u003ca name=\"options\"\u003e\u003c/a\u003eOptions\n\n| Option | Description | Requiered | Type | Default |\n|---|---|---|---|---|\n| --start | Path of the initial json to look for | false | string | `process.cwd()` |\n| --failOn | Fail (exit with code 1) if any package license does not satisfies any license in the provided list | true | string[] |  |\n| --outputFileName | Name of the report file generated | false | string | `license-report-\u003ctimestamp\u003e.md` |\n| --errorReportFileName | Name of the error report file generated when a license in the `failOn` option is found | false | string | `license-error-\u003ctimestamp\u003e.md` |\n| --disableErrorReport | Flag to disable the error report file generation | false | boolean  | `false` |\n| --disableReport | Flag to disable the report file generation, whether there is an error or not | false | boolean | `false` |\n| --customHeader | Name of a text file containing the custom header to add at the start of the generated report | false | string | This application makes use of the following open source packages: |\n\n## 🧑‍💻 \u003ca name=\"examples\"\u003e\u003c/a\u003eExamples\n\n### check command\n\nThis command is intended to be used as a standalone functionality to check whether the value supplied is in compliance with SDPX. It is useful for checking the value before using it with the `scan` command:\n\n```sh\nnpx @onebeyond/license-checker check \"(MIT OR GPL-1.0+) AND 0BSD\"\n```\n\nIf the value provided is not SPDX compliant, the process fails (exit error 1).\n\n### scan command\n\nAll the values provided in the `failOn` list must be [SPDX](https://spdx.dev/specifications/) compliant. Otherwise, an error will be thrown (exit error 1). \nCheck the [SPDX license list](https://spdx.org/licenses/).\n\n```sh\nnpx @onebeyond/license-checker scan --failOn MIT GPL-1.0+\n```\n\nThe input list is transformed into a SPDX expression with the `OR` logical operator. In the example, that is `MIT OR GPL-1.0+`.\nIf any of the packages' licenses satisfies that expression, the process fails (exit error 1).\n\n## 🔗 Useful links\n\n- [Licensing a repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository)\n- [Choose a license](https://choosealicense.com/appendix/)\n\n## ⚠️ Temporal issue\n\nAn issue in `spdx-satisfies` has been found and it's pending resolution. Until then, GFDL 1x licenses are not supported and an error will be thrown if either packages or failOn arguments contain it. \n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/jmtorralvo\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6839860?v=4?s=100\" width=\"100px;\" alt=\"Jose Manuel Torralvo Moyano\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJose Manuel Torralvo Moyano\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=jmtorralvo\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=jmtorralvo\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-jmtorralvo\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-jmtorralvo\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3Ajmtorralvo\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/MarioQuiroga32\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/43605474?v=4?s=100\" width=\"100px;\" alt=\"Mario Quiroga\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMario Quiroga\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=MarioQuiroga32\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=MarioQuiroga32\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-MarioQuiroga32\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-MarioQuiroga32\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3AMarioQuiroga32\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/inigomarquinez\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/25435858?v=4?s=100\" width=\"100px;\" alt=\"Íñigo Marquínez\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eÍñigo Marquínez\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=inigomarquinez\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=inigomarquinez\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-inigomarquinez\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-inigomarquinez\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3Ainigomarquinez\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/LonelyPrincess\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17673317?v=4?s=100\" width=\"100px;\" alt=\"Sara Hernández\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSara Hernández\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=LonelyPrincess\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/dustytrinkets\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/18383417?v=4?s=100\" width=\"100px;\" alt=\"Laura\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLaura\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3Adustytrinkets\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ardguezsoc\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/79102959?v=4?s=100\" width=\"100px;\" alt=\"Adri Rodríguez \"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAdri Rodríguez \u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3Aardguezsoc\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/neodmy\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/36865163?v=4?s=100\" width=\"100px;\" alt=\"David Miguel Yusta\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDavid Miguel Yusta\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=neodmy\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=neodmy\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-neodmy\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-neodmy\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/pulls?q=is%3Apr+reviewed-by%3Aneodmy\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=neodmy\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/lcruz45\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/91122266?v=4?s=100\" width=\"100px;\" alt=\"Lucía\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLucía\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#design-lcruz45\" title=\"Design\"\u003e🎨\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://ulisesgascon.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5110813?v=4?s=100\" width=\"100px;\" alt=\"Ulises Gascón\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eUlises Gascón\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=UlisesGascon\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=UlisesGascon\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-UlisesGascon\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.one-beyond.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/50929081?v=4?s=100\" width=\"100px;\" alt=\"Fernando de la Torre\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFernando de la Torre\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/onebeyond/license-checker/commits?author=nanotower\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebeyond%2Flicense-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonebeyond%2Flicense-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebeyond%2Flicense-checker/lists"}