{"id":13508649,"url":"https://github.com/unnawut/licensir","last_synced_at":"2025-03-30T11:32:30.557Z","repository":{"id":48321985,"uuid":"110337680","full_name":"unnawut/licensir","owner":"unnawut","description":"An Elixir mix task that lists all the licenses used by your Mix project dependencies.","archived":true,"fork":false,"pushed_at":"2021-08-01T16:10:29.000Z","size":119,"stargazers_count":74,"open_issues_count":5,"forks_count":28,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:34:21.882Z","etag":null,"topics":["elixir","elixir-lang","hacktoberfest","legal","license","license-scan","mix","mix-tasks"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/licensir","language":"Elixir","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/unnawut.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}},"created_at":"2017-11-11T10:44:28.000Z","updated_at":"2024-12-24T20:52:59.000Z","dependencies_parsed_at":"2022-08-20T08:11:11.162Z","dependency_job_id":null,"html_url":"https://github.com/unnawut/licensir","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unnawut%2Flicensir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unnawut%2Flicensir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unnawut%2Flicensir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unnawut%2Flicensir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unnawut","download_url":"https://codeload.github.com/unnawut/licensir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314011,"owners_count":20757450,"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","elixir-lang","hacktoberfest","legal","license","license-scan","mix","mix-tasks"],"created_at":"2024-08-01T02:00:56.227Z","updated_at":"2025-03-30T11:32:30.107Z","avatar_url":"https://github.com/unnawut.png","language":"Elixir","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"**Notice: This repository is now archived.** Thank you for over 192,000 downloads since December 2017. While I think Elixir is an awesome ecosystem, I no longer have the chance to be developing using Elixir on a regular basis. :'(\n\n-----\n\n# Licensir\n\n[![Build Status](https://travis-ci.org/unnawut/licensir.svg?branch=master)](https://travis-ci.org/unnawut/licensir)\n[![Coverage Status](https://coveralls.io/repos/github/unnawut/licensir/badge.svg?branch=master)](https://coveralls.io/github/unnawut/licensir?branch=master)\n[![Module Version](https://img.shields.io/hexpm/v/licensir.svg)](https://hex.pm/packages/licensir)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/licensir/)\n[![Total Download](https://img.shields.io/hexpm/dt/licensir.svg)](https://hex.pm/packages/licensir)\n[![License](https://img.shields.io/hexpm/l/licensir.svg)](https://github.com/unnawut/licensir/blob/master/LICENSE.md)\n[![Last Updated](https://img.shields.io/github/last-commit/unnawut/licensir.svg)](https://github.com/unnawut/licensir/commits/master)\n\nAn Elixir mix task that list the license(s) of all installed packages in your project.\n\n## Installation\n\nThe package can be installed by adding `:licensir` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:licensir, \"~\u003e 0.7\", only: :dev, runtime: false}\n  ]\nend\n```\n\nThis mix task in most cases only needs to be run on a development machine and independent from the runtime applications, hence the `only: dev, runtime: false` options.\n\n#### Install locally\n\nIf you do not wish to include this tool as part of your dependencies, you may also install it locally by running:\n\n```elixir\n$ mix archive.install hex licensir 0.7.0\n```\n\nNow you can access this tool from any path on your local machine that has access to `mix`.\n\n## Usage\n\nRun `mix licenses` to get the list of packages and their licenses:\n\n```shell\n$ mix licenses\n+---------------------+---------+--------------------------------------------------------+\n| Package             | Version | License                                                |\n+---------------------+---------+--------------------------------------------------------+\n| certifi             |         | BSD                                                    |\n| earmark             | 1.3.2   | Apache 2.0                                             |\n| ex_doc              | 0.20.2  | Apache 2.0                                             |\n| excoveralls         |         | Unsure (found: MIT, Unrecognized license file content) |\n| hackney             |         | Apache 2.0                                             |\n| idna                |         | Unsure (found: BSD, MIT)                               |\n| jason               |         | Apache 2.0                                             |\n| makeup              | 0.8.0   | Unsure (found: BSD, Unrecognized license file content) |\n| makeup_elixir       | 0.13.0  | BSD                                                    |\n| metrics             |         | BSD                                                    |\n| mimerl              |         | MIT                                                    |\n| nimble_parsec       | 0.5.0   | Apache 2.0                                             |\n| ssl_verify_fun      |         | MIT                                                    |\n| table_rex           | 2.0.0   | MIT                                                    |\n| unicode_util_compat |         | Unsure (found: Apache 2.0, BSD)                        |\n+---------------------+---------+--------------------------------------------------------+\n```\n\nRun `mix licenses --csv` to output in csv format:\n\n```csv\nPackage,Version,License\ncertifi,,BSD\nearmark,1.3.2,Apache 2.0\nex_doc,0.20.2,Apache 2.0\nexcoveralls,,\"Unsure (found: MIT, Unrecognized license file content)\"\nhackney,,Apache 2.0\nidna,,\"Unsure (found: BSD, MIT)\"\njason,,Apache 2.0\nmakeup,0.8.0,\"Unsure (found: BSD, Unrecognized license file content)\"\nmakeup_elixir,0.13.0,BSD\nmetrics,,BSD\nmimerl,,MIT\nnimble_parsec,0.5.0,Apache 2.0\nssl_verify_fun,,MIT\nunicode_util_compat,,\"Unsure (found: Apache 2.0, BSD)\"\n```\n\n### Flags\n* `--top-level-only` - Only fetch license information from top level dependencies (e.g. packages that are directly listed in your application's `mix.exs`). Excludes transitive dependencies.\n\n## Usage as a library\n\nYou may call the function `Licensir.Scanner.scan()` from your Elixir application to get a list of license data per dependency.\n\n```elixir\niex\u003e Licensir.Scanner.scan([])\n[\n  %Licensir.License{\n    app: :jason,\n    dep: %Mix.Dep{\n      app: :jason,\n      deps: ...\n    },\n    file: \"Apache 2\",\n    hex_metadata: [\"Apache 2.0\"],\n    license: \"Apache 2.0\",\n    mix: nil,\n    name: \"jason\",\n    version: nil\n  },\n  %Licensir.License{...},\n  ...\n]\n```\n\n## Copyright and License\n\nCopyright (c) 2017, Unnawut Leepaisalsuwanna.\n\nThis library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file\nfor further details.\n\nThis project contains 3rd party work as follow:\n\n- ASCII table rendering: a [partial copy](https://github.com/unnawut/licensir/tree/master/lib/table_rex) of [djm/table_rex](https://github.com/djm/table_rex).\n- CSV rendering: a [partial copy](https://github.com/unnawut/licensir/tree/master/lib/csv) of [beatrichartz/csv](https://github.com/beatrichartz/csv).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funnawut%2Flicensir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funnawut%2Flicensir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funnawut%2Flicensir/lists"}