{"id":21657268,"url":"https://github.com/cantido/hex_licenses","last_synced_at":"2025-04-11T22:12:56.049Z","repository":{"id":40593286,"uuid":"405010659","full_name":"Cantido/hex_licenses","owner":"Cantido","description":"A Mix task to check licenses","archived":false,"fork":false,"pushed_at":"2024-08-30T21:16:39.000Z","size":187,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T22:12:50.328Z","etag":null,"topics":["elixir","hacktoberfest","license-management","mix"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/hex_licenses","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cantido.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/CC-BY-3.0.txt","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T08:30:38.000Z","updated_at":"2024-11-13T18:28:42.000Z","dependencies_parsed_at":"2022-09-19T10:01:00.758Z","dependency_job_id":null,"html_url":"https://github.com/Cantido/hex_licenses","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cantido%2Fhex_licenses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cantido%2Fhex_licenses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cantido%2Fhex_licenses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cantido%2Fhex_licenses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cantido","download_url":"https://codeload.github.com/Cantido/hex_licenses/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487684,"owners_count":21112190,"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":["elixir","hacktoberfest","license-management","mix"],"created_at":"2024-11-25T09:20:21.082Z","updated_at":"2025-04-11T22:12:56.026Z","avatar_url":"https://github.com/Cantido.png","language":"Elixir","funding_links":["https://liberapay.com/rosa"],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2021 Rosa Richter\n\nSPDX-License-Identifier: MIT\n--\u003e\n\n# HexLicenses\n\n[![Hex.pm](https://img.shields.io/hexpm/v/hex_licenses)](https://hex.pm/packages/hex_licenses/)\n[![builds.sr.ht status](https://builds.sr.ht/~cosmicrose/hex_licenses.svg)](https://builds.sr.ht/~cosmicrose/hex_licenses?)\n[![liberapay goals](https://img.shields.io/liberapay/goal/rosa.svg?logo=liberapay)](https://liberapay.com/rosa)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1-4baaaa.svg)](code_of_conduct.md)\n\nA Mix tool to fetch the licenses of your dependences.\n\n## Installation\n\nThe package can be installed by adding `hex_licenses` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:hex_licenses, \"~\u003e 0.3\", only: [:dev], runtime: false}\n  ]\nend\n```\n\nYou can also install it as an archive to have the task handy without another dependency on your project:\n\n```sh\nmix archive.install hex hex_licenses\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nThe docs can be found at [https://hexdocs.pm/hex_licenses](https://hexdocs.pm/hex_licenses).\n\n## Usage\n\nThere are a few mix tasks in this project.\n\n`mix licenses` will print a summary of your dependencies and the status of their licenses.\nLicense IDs defined by the package should be an identifier on the [SPDX License List](https://spdx.org/licenses/).\n\n```\n$ mix licenses\nDependency  Status\nex_doc      all valid\nhttpoison   all valid\npoison      all valid\n```\n\n`mix licenses.explain` will print the dependencies that have unidentifiable licenses.\nYou can also pass the `--osi` flag to all these tasks in order to ensure all licenses are approved by the [Open Source Initiative](https://opensource.org).\n\n```\n$ mix licenses.explain --osi\ndependency_a has 1 unsafe licenses:\n - \"MIT License\" is not an SPDX ID.\ndependency_b has 1 unsafe licenses:\n - \"WTFPL\" is not OSI-approved.\n```\n\nLastly, `mix licenses.lint` will check the package info in your own project,\nand returns an error code to your shell if the ID is not found.\n\n```\n$ mix licenses.lint\nThis project has 1 unsafe licenses:\n - \"badid\" is not an SPDX ID\n```\n\n## Roadmap\n\n- ~~Summary of dependency licenses~~\n- ~~Feedback on specific license problems~~\n- ~~Lint license field in current project~~\n- ~~Check if license list matches all licenses in the `LICENSES` dir (as part of the [REUSE specification](https://reuse.software))~~\n- ~~Split out OSI check into an `--osi` flag in case you don't care about OSI approval~~\n- ~~Read dependencies directly from `mix.lock` so we have exact version numbers~~\n- ~~Check `deps/` directory to read licenses directly from the `mix.exs` of dependencies~~\n- Read license IDs from an `.approved-licenses` file to specify the licenses you support, and fail all others\n\n## Similar Projects\n\nThese tools also help you deal with licenses.\nPlease feel free to add your own to this list!\n\n- [`reuse`](https://reuse.software) - helps your project follow the REUSE 3.0 Specification\n- [`sbom`](https://hex.pm/packages/sbom) - generates a software bill-of-materials of your dependencies in CycloneDX format\n\n## Maintainer\n\nThis project was developed by [Rosa Richter](https://about.me/rosa.richter).\nYou can get in touch with her on [Keybase.io](https://keybase.io/cantido).\n\n## Thanks\n\nThanks to my coworker Mark Kanof for suggesting the idea.\n\n## Contributing\n\nQuestions and pull requests are more than welcome.\nI follow Elixir's tenet of bad documentation being a bug,\nso if anything is unclear, please [file an issue](https://todo.sr.ht/~cosmicrose/hex_licenses) or ask on the [mailing list]!\nIdeally, my answer to your question will be in an update to the docs.\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for all the details you could ever want about helping me with this project.\n\nNote that this project is released with a Contributor [Code of Conduct].\nBy participating in this project you agree to abide by its terms.\n\n## License\n\nMIT License\n\nCopyright 2021 Rosa Richter\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[mailing list]: https://lists.sr.ht/~cosmicrose/hex_licenses\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcantido%2Fhex_licenses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcantido%2Fhex_licenses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcantido%2Fhex_licenses/lists"}