{"id":46156555,"url":"https://github.com/quentinrob/license-checkr","last_synced_at":"2026-03-05T15:01:56.150Z","repository":{"id":340522814,"uuid":"1165776916","full_name":"QuentinRob/license-checkr","owner":"QuentinRob","description":"Scan your dependencies. Know your risks. Ship with confidence.","archived":false,"fork":false,"pushed_at":"2026-03-02T09:33:20.000Z","size":417,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-02T12:23:36.432Z","etag":null,"topics":["cli","dependency-management","license","license-checker","license-compliance","rust","security","spdx"],"latest_commit_sha":null,"homepage":"https://quentinrob.github.io/license-checkr","language":"Rust","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/QuentinRob.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"quentinrob"}},"created_at":"2026-02-24T14:34:09.000Z","updated_at":"2026-03-02T09:33:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/QuentinRob/license-checkr","commit_stats":null,"previous_names":["quentinrob/license-checkr"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/QuentinRob/license-checkr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRob%2Flicense-checkr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRob%2Flicense-checkr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRob%2Flicense-checkr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRob%2Flicense-checkr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuentinRob","download_url":"https://codeload.github.com/QuentinRob/license-checkr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRob%2Flicense-checkr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30132585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T14:41:47.141Z","status":"ssl_error","status_checked_at":"2026-03-05T14:41:21.567Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","dependency-management","license","license-checker","license-compliance","rust","security","spdx"],"created_at":"2026-03-02T10:06:33.183Z","updated_at":"2026-03-05T15:01:56.133Z","avatar_url":"https://github.com/QuentinRob.png","language":"Rust","funding_links":["https://buymeacoffee.com/quentinrob"],"categories":[],"sub_categories":[],"readme":"# 🔍 license-checkr\n\n[![Build](https://github.com/QuentinRob/license-checkr/actions/workflows/ci.yml/badge.svg)](https://github.com/QuentinRob/license-checkr/actions)\n[![Release](https://img.shields.io/github/v/release/QuentinRob/license-checkr?color=brightgreen)](https://github.com/QuentinRob/license-checkr/releases)\n[![License](https://img.shields.io/github/license/QuentinRob/license-checkr)](LICENSE)\n[![Rust 2021](https://img.shields.io/badge/rust-2021_edition-orange?logo=rust)](https://www.rust-lang.org)\n[![Stars](https://img.shields.io/github/stars/QuentinRob/license-checkr?style=social)](https://github.com/QuentinRob/license-checkr/stargazers)\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-support-yellow?logo=buy-me-a-coffee\u0026logoColor=white)](https://buymeacoffee.com/quentinrob)\n\n\u003e **Scan your dependencies. Know your risks. Ship with confidence.**\n\n`license-checkr` is a blazing-fast CLI tool written in Rust that scans your project's dependency manifests, resolves license information, evaluates it against a policy you define, and outputs a clear report — in your terminal, as JSON, or as a PDF.\n\n---\n\n## ✨ Features\n\n- 🌍 **Multi-ecosystem** — Rust, Python, Java, Node.js, and .NET in a single run\n- 🔎 **Auto-detection** — no configuration required; detects your stack automatically\n- 📡 **Online enrichment** — fetch missing license data from crates.io, PyPI, Maven Central, and npm\n- ⚖️ **Policy engine** — define per-license rules (`pass` / `warn` / `error`) in a simple TOML file\n- 🏷️ **SPDX-aware** — normalizes 20+ non-standard license strings to SPDX identifiers\n- 🧮 **Expression support** — parses full SPDX compound expressions including `(Apache-2.0 OR MIT) AND BSD-3-Clause` with proper operator precedence (`AND` binds tighter than `OR`, parentheses override)\n- 📊 **Multiple outputs** — colored terminal table, machine-readable JSON, or a shareable PDF report\n- 🚦 **CI-friendly** — exits with code `1` when a policy error is found; `0` otherwise\n- 🗂️ **Workspace scanning** — use `--recursive` to scan all sub-projects in a monorepo in a single run\n- 🤖 **MCP server** — expose `license-checkr` as an MCP tool so AI agents (Claude Desktop, Cursor, etc.) can scan projects and look up licenses directly\n\n---\n\n## 🚀 Installation\n\n### Pre-built binaries\n\nDownload the latest release for your platform:\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/QuentinRob/license-checkr/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Windows-x86__64-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white\" alt=\"Windows x64\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/QuentinRob/license-checkr/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Linux-x86__64-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black\" alt=\"Linux x64\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/QuentinRob/license-checkr/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Linux-ARM64-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black\" alt=\"Linux ARM64\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/QuentinRob/license-checkr/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macOS-Apple_Silicon-000000?style=for-the-badge\u0026logo=apple\u0026logoColor=white\" alt=\"macOS ARM64\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nExtract and place the binary somewhere on your `PATH`:\n\n```bash\n# Linux / macOS\ntar -xzf license-checkr-*.tar.gz\nsudo mv license-checkr /usr/local/bin/\n\n# Windows — extract the .zip and move license-checkr.exe to a folder in your PATH\n```\n\n### From source (requires Rust 1.75+)\n\n```bash\ncargo install --git https://github.com/QuentinRob/license-checkr\n```\n\n### Build locally\n\n```bash\ngit clone https://github.com/QuentinRob/license-checkr\ncd license-checkr\ncargo build --release\n# binary at ./target/release/license-checkr\n```\n\n---\n\n## 📖 Usage\n\n```\nlicense-checkr [OPTIONS] [PATH]\n```\n\n| Argument | Description |\n|---|---|\n| `[PATH]` | Project root to scan (default: current directory) |\n| `--online` | Fetch license data from package registries |\n| `--config \u003cFILE\u003e` | Override policy config file path |\n| `--report \u003cFORMAT\u003e` | Output format: `terminal` (default), `json`, `pdf` |\n| `--pdf [FILE]` | Write PDF report (default: `license-report.pdf`) |\n| `--exclude-lang \u003cLANG\u003e` | Skip an ecosystem: `rust` `python` `java` `node` `dotnet` (repeatable) |\n| `-r, --recursive` | Recursively scan sub-projects (workspace mode) |\n| `-v, --verbose` | Show all dependencies, not just warnings and errors |\n| `-q, --quiet` | Print summary line only |\n\n### Examples\n\n```bash\n# Scan the current directory\nlicense-checkr\n\n# Scan a specific project with online registry lookup\nlicense-checkr ~/my-project --online\n\n# Export a PDF report\nlicense-checkr --pdf report.pdf\n\n# Output machine-readable JSON for CI pipelines\nlicense-checkr --report json | jq '.[] | select(.verdict == \"error\")'\n\n# Scan only Rust and Node, skip Python and Java\nlicense-checkr --exclude-lang python --exclude-lang java\n\n# Quiet mode — perfect for CI scripts\nlicense-checkr -q \u0026\u0026 echo \"✅ All licenses OK\"\n```\n\n### Workspace scanning\n\nWhen your repository contains multiple sub-projects (a monorepo), use `--recursive` to discover and scan every sub-project in a single pass:\n\n```bash\n# Scan all sub-projects under the current directory\nlicense-checkr --recursive\n\n# Workspace scan with online enrichment and a unified PDF report\nlicense-checkr --recursive --online --pdf workspace-report.pdf\n\n# JSON output: array of { project, path, dependencies }\nlicense-checkr --recursive --report json | jq '.[].project'\n\n# Quiet workspace summary — great for CI\nlicense-checkr --recursive -q \u0026\u0026 echo \"✅ All workspace licenses OK\"\n```\n\nEach sub-project is scanned independently with its own policy config (if present). The PDF report includes a workspace cover page with an aggregated summary, followed by per-project Risk Summary and Dependency Table sections.\n\n---\n\n## 🤖 MCP Server (AI Agent Tool)\n\n`license-checkr` can act as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server, letting AI agents like Claude Desktop or Cursor query it as a tool.\n\n```bash\nlicense-checkr mcp serve\n```\n\nThis starts a JSON-RPC server over stdio. The server exposes two tools:\n\n| Tool | Description |\n|---|---|\n| `scan_licenses` | Scan a project directory — accepts `path`, `online`, `config`, `exclude_lang`, `recursive` |\n| `get_package_license` | Look up a single package — accepts `name`, `version`, `ecosystem` (`rust`/`python`/`java`/`node`) |\n\n### Claude Desktop configuration\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"license-checkr\": {\n      \"command\": \"license-checkr\",\n      \"args\": [\"mcp\", \"serve\"]\n    }\n  }\n}\n```\n\nConfig file locations:\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nOnce configured, Claude can answer questions like:\n- *\"Scan my project at ~/my-app and show any license errors\"*\n- *\"What license does serde 1.0 use? Is it compatible with my policy?\"*\n\n---\n\n## 🌍 Supported Ecosystems\n\n| Ecosystem | Manifest files parsed | Unit tested | Offline validated | Online validated |\n|---|---|:---:|:---:|:---:|\n| 🦀 **Rust** | `Cargo.lock` | ✅ | ✅ | ✅ crates.io |\n| 🐍 **Python** | `Pipfile.lock`, `requirements.txt`, `pyproject.toml` | ✅ | ⚠️ not validated | ⚠️ not validated |\n| ☕ **Java** | `pom.xml`, `build.gradle`, `build.gradle.kts`, `gradle.lockfile` | ✅ | ⚠️ not validated | ⚠️ not validated |\n| 🟢 **Node.js** | `package-lock.json`, `yarn.lock`, `package.json` | ✅ | ⚠️ not validated | ⚠️ not validated |\n| 🔷 **.NET** | `*.csproj`, `*.fsproj`, `packages.config`, `paket.lock` | ✅ | ⚠️ not validated | ❌ no NuGet client yet |\n\nMultiple ecosystems are detected automatically in a single pass. Use `--exclude-lang` to opt out of any you don't need.\n\n---\n\n## ⚙️ Policy Configuration\n\nCreate a `.license-checkr/config.toml` file in your project root (or at `~/.config/license-checkr/config.toml` for a global policy). If no config is found, a sensible default policy is applied.\n\n```toml\n[policy]\n# Default verdict for any license not listed below\ndefault = \"warn\"   # pass | warn | error\n\n[policy.licenses]\n# Permissive — always allowed\n\"MIT\"          = \"pass\"\n\"Apache-2.0\"   = \"pass\"\n\"BSD-2-Clause\" = \"pass\"\n\"BSD-3-Clause\" = \"pass\"\n\"ISC\"          = \"pass\"\n\"0BSD\"         = \"pass\"\n\"Unlicense\"    = \"pass\"\n\"CC0-1.0\"      = \"pass\"\n\n# Weak copyleft — review required\n\"LGPL-2.1\"    = \"warn\"\n\"MPL-2.0\"     = \"warn\"\n\"LGPL-3.0\"    = \"warn\"\n\n# Strong copyleft — blocked\n\"GPL-2.0\"     = \"error\"\n\"GPL-3.0\"     = \"error\"\n\"AGPL-3.0\"    = \"error\"\n\n# Unknown licenses — warn but don't block\n\"unknown\"      = \"warn\"\n```\n\n### Config lookup order\n\n1. `--config \u003cFILE\u003e` argument\n2. `./.license-checkr/config.toml` (project-level)\n3. `~/.config/license-checkr/config.toml` (global)\n4. Built-in default policy\n\n---\n\n## 📊 Output Examples\n\n### Terminal (default)\n\n```\n  → Rust   42 dependencies\n  → Node   87 dependencies\n\n ┌──────────────────────────────────────────────────────┐\n │  SUMMARY                                             │\n │  Scanned path   :  /home/user/my-project             │\n │  Total          :  129                               │\n │  ✓  Pass        :   114  MIT (68), Apache-2.0 (32)  │\n │  ⚠  Warn        :    12  unknown (12)               │\n │  ✗  Error       :     3  GPL-3.0 (3)                │\n └──────────────────────────────────────────────────────┘\n\n Errors\n ┌───────────────────┬─────────┬───────────┬─────────┬───────────────┬────────┐\n │ Name              │ Version │ Ecosystem │ License │ Risk          │Verdict │\n ╞═══════════════════╪═════════╪═══════════╪═════════╪═══════════════╪════════╡\n │ some-gpl-package  │ 2.1.0   │ Node      │ GPL-3.0 │ StrongCopyleft│ error  │\n └───────────────────┴─────────┴───────────┴─────────┴───────────────┴────────┘\n```\n\n### JSON\n\n```bash\nlicense-checkr --report json\n```\n\n```json\n[\n  {\n    \"name\": \"serde\",\n    \"version\": \"1.0.136\",\n    \"ecosystem\": \"Rust\",\n    \"license_raw\": \"MIT OR Apache-2.0\",\n    \"license_spdx\": \"MIT OR Apache-2.0\",\n    \"risk\": \"Permissive\",\n    \"verdict\": \"pass\",\n    \"source\": \"registry\"\n  }\n]\n```\n\n### PDF\n\n```bash\nlicense-checkr --pdf report.pdf\n```\n\nGenerates a multi-page PDF with:\n- Cover page with scan summary and verdict statistics\n- Risk summary table with per-verdict counts and ecosystem breakdown\n- Full dependency table (paginated)\n\n---\n\n## 🔬 License Risk Levels\n\n| Risk | Description | Examples |\n|---|---|---|\n| ✅ **Permissive** | Minimal restrictions; use freely | MIT, Apache-2.0, BSD, ISC, Unlicense |\n| ⚠️ **Weak Copyleft** | Share-alike applies only to the library | LGPL, MPL-2.0, EPL |\n| 🔴 **Strong Copyleft** | May require your project to be open-sourced | GPL-2.0, GPL-3.0, AGPL-3.0 |\n| 🔒 **Proprietary** | Commercial; requires explicit agreement | `commercial`, `proprietary` |\n| ❓ **Unknown** | Could not be determined | missing or unrecognized license |\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how to get started:\n\n1. **Fork** the repository\n2. **Clone** your fork: `git clone https://github.com/YOUR_USERNAME/license-checkr`\n3. **Create a branch**: `git checkout -b feat/my-improvement`\n4. **Make your changes** and add tests\n5. **Run the test suite**: `cargo test`\n6. **Open a pull request** — describe what you changed and why\n\n### Ideas for contribution\n\n- 🆕 New ecosystem analyzer (Go modules, Ruby gems, PHP Composer, Swift SPM…)\n- 📡 NuGet registry client for `--online` .NET support\n- 🌐 Additional SPDX identifiers in the classifier\n- 🧪 More unit tests and edge-case coverage\n\nPlease open an issue before starting work on a large change so we can discuss the approach.\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.\n\n---\n\n## ☕ Support\n\nIf `license-checkr` saved you time, a coffee is always appreciated — but never required!\n\n\u003ca href=\"https://buymeacoffee.com/quentinrob\"\u003e\n  \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"50\" /\u003e\n\u003c/a\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ and 🦀 Rust\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquentinrob%2Flicense-checkr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquentinrob%2Flicense-checkr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquentinrob%2Flicense-checkr/lists"}