{"id":13561847,"url":"https://github.com/licensee/licensee","last_synced_at":"2025-04-03T17:31:45.403Z","repository":{"id":19764536,"uuid":"23022377","full_name":"licensee/licensee","owner":"licensee","description":"A Ruby Gem to detect under what license a project is distributed.","archived":false,"fork":false,"pushed_at":"2024-10-28T05:24:48.000Z","size":2805,"stargazers_count":787,"open_issues_count":23,"forks_count":266,"subscribers_count":56,"default_branch":"main","last_synced_at":"2024-10-29T16:58:17.594Z","etag":null,"topics":["law","legal","licensing","open-source","open-source-licensing","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"https://licensee.github.io/licensee/","language":"Ruby","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/licensee.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"docs/SECURITY.md","support":"docs/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"benbalter"}},"created_at":"2014-08-16T16:39:56.000Z","updated_at":"2024-10-28T05:24:51.000Z","dependencies_parsed_at":"2023-01-13T20:34:30.934Z","dependency_job_id":"712375dc-8d42-4055-9b8e-511f47fb77c3","html_url":"https://github.com/licensee/licensee","commit_stats":{"total_commits":1286,"total_committers":69,"mean_commits":18.63768115942029,"dds":"0.49222395023328147","last_synced_commit":"d0afb444fec98489d7a74a3d6bb3b5bb3c883c90"},"previous_names":["benbalter/licensee"],"tags_count":104,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licensee%2Flicensee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licensee%2Flicensee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licensee%2Flicensee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licensee%2Flicensee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/licensee","download_url":"https://codeload.github.com/licensee/licensee/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247047043,"owners_count":20874763,"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":["law","legal","licensing","open-source","open-source-licensing","ruby","ruby-gem"],"created_at":"2024-08-01T13:01:01.938Z","updated_at":"2025-04-03T17:31:45.379Z","avatar_url":"https://github.com/licensee.png","language":"Ruby","funding_links":["https://patreon.com/benbalter"],"categories":["Ruby","Static Application Security Testing","Licensing"],"sub_categories":[],"readme":"# Licensee\n\n*A Ruby Gem to detect under what license a project is distributed.*\n\n[![](https://github.com/licensee/licensee/workflows/CI/badge.svg)](https://github.com/licensee/licensee/actions?query=workflow%3ACI) [![Gem Version](https://badge.fury.io/rb/licensee.svg)](https://badge.fury.io/rb/licensee) [![Maintainability](https://api.codeclimate.com/v1/badges/5dca6a1ff7015c6d8cab/maintainability)](https://codeclimate.com/github/benbalter/licensee/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/5dca6a1ff7015c6d8cab/test_coverage)](https://codeclimate.com/github/benbalter/licensee/test_coverage) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/licensee/licensee/badge)](https://securityscorecards.dev/viewer/?uri=github.com/licensee/licensee) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8021/badge)](https://www.bestpractices.dev/projects/8021)\n\n\n## The problem\n\n* You've got an open source project. How do you know what you can and can't do with the software?\n* You've got a bunch of open source projects, how do you know what their licenses are?\n* You've got a project with a license file, but which license is it? Has it been modified?\n\n## The solution\n\nLicensee automates the process of reading `LICENSE` files and compares their contents to known licenses using several strategies (which we call \"Matchers\"). It attempts to determine a project's license in the following order:\n\n* If the license file has an explicit copyright notice, and nothing more (e.g., `Copyright (c) 2015 Ben Balter`), we'll assume the author intends to retain all rights, and thus the project isn't licensed.\n* If the license is an exact match to a known license. If we strip away whitespace and copyright notice, we might get lucky, and direct string comparison in Ruby is cheap.\n* If we still can't match the license, we use a fancy math thing called the [Sørensen–Dice coefficient](https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient), which is really good at calculating the similarity between two strings. By calculating the percent changed from the known license to the license file, you can tell, e.g., that a given license is 95% similar to the MIT license, that 5% likely representing legally insignificant changes to the license text.\n\n*Special thanks to [@vmg](https://github.com/vmg) for his Git and algorithmic prowess.*\n\n## Installation\n\nTo use the latest released [gem](https://rubygems.org/pages/download) from [RubyGems](https://rubygems.org/):\n\n    gem install licensee\n\nTo use licensee programmatically in your own Ruby project, add `gem 'licensee'` to your project's `Gemfile`.\n\nTo run licensee directly from source:\n\n    gem install bundler\n    bundle install\n    bundle exec bin/licensee\n\nOn Windows, the last line needs to include the Ruby interpreter:\n\n    bundle exec ruby bin\\licensee\n\n## Docker\n\nLicensee also comes with a Dockerfile if you prefer to run Licensee within a Docker container:\n\n1. `git clone https://github.com/licensee/licensee \u0026\u0026 cd licensee`\n2. `docker build . --tag licensee`\n3. `docker run licensee [COMMAND]` (see [command line usage](./command-line-usage.md))\n\n*Example (detecting the license of `rails/rails` on GitHub):* `docker run licensee detect rails/rails --remote`\n\n## Documentation\n\nSee [the docs folder](/docs) for more information. You may be interested in:\n\n* [Instructions for using Licensee](usage.md)\n* [Customizing Licensee's behavior](customizing.md)\n* [Contributing to Licensee](CONTRIBUTING.md) (and development instructions)\n* More information about [what Licensee looks at](what-we-look-at.md) (or doesn't, and why)\n\n## Semantic Versioning\n\nThis project conforms to [semver](http://semver.org/). As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/) with two digits of precision. For example:\n\n```ruby\nspec.add_dependency 'licensee', '~\u003e 1.0'\n```\n\nThis means your project is compatible with licensee 1.0 up until 2.0. You can also set a higher minimum version:\n\n```ruby\nspec.add_dependency 'licensee', '~\u003e 1.1'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicensee%2Flicensee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flicensee%2Flicensee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicensee%2Flicensee/lists"}