LicenseID
A portable SPDX License ID matcher.
licenseid takes license text as input and identifies the closest matched SPDX License ID using a hybrid search strategy (SQLite FTS5 trigram + RapidFuzz ranking + optional Java validation).
Features
- Hybrid strategy:
- Tier 1: Broad recall using SQLite FTS5 with trigram tokenization.
- Tier 2: Precision ranking using RapidFuzz (token set ratio) + Popularity weighting.
- Tier 3: Optional final validation via
tools-javaif available.
- Unix philosophy: Parseable CLI output.
Installation
Install with pipx:
pipx install licenseid
Or using uv:
uv tool install licenseid
Usage
1. Update the license database
Before matching, you need to build the local license index:
licenseid update
2. Match a license
Match text from a file:
licenseid match LICENSE.txt
Match with Java validation enabled:
licenseid match LICENSE.txt --java
Match with popularity tie-breaker enabled:
licenseid match LICENSE.txt --pop
The tie-breaker is triggered only when candidate similarity scores differ by less than 0.02%.
3. Output formats
Default (Unix-friendly):
LICENSE_ID=Apache-2.0 SCORE=0.9850
JSON:
licenseid match LICENSE.txt --json
Configuration
SPDX_TOOLS_JAR: Path to thetools-javajar for Tier 3 validation.
License
Apache-2.0
Metadata
Release files for LicenseID 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| licenseid-0.1.0.tar.gz | 15.4 kB | With provenance | Details for licenseid-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| licenseid-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for licenseid-0.1.0-py3-none-any.whl |
Total release size: 28.0 kB
Release files / licenseid-0.1.0.tar.gz
| Download URL | licenseid-0.1.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29889235d3acc6510531573c46bf292e07d6d18856e1f31c8346e698710660ee
|
|
BLAKE2b-256 checksum How to use checksums |
0e92506a936de17c9acc1cf28537ac3583512feb2503941bc2ae35ca582d7ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logRelease files / licenseid-0.1.0-py3-none-any.whl
| Download URL | licenseid-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a0b584a31c41bbe47b76d6a6c482679b2fb15ed9944781b1ad5ca7ccef543f3
|
|
BLAKE2b-256 checksum How to use checksums |
087ff9ca3f223ec06b0924f034e0c4e5115c806fee77c2ba1768cac5614f53a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logSecurity for LicenseID 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for licenseid-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.