spdx_tool

v0.4.1

SPDX license detection and management tool

spdx-tool scans the source files to identify licenses and allows to update them in order to use the SPDX license format. It can be used to:

  • identify the license used in source files of a project,
  • produce a JSON/XML report for the licenses found with the list of files,
  • replace a license header by the SPDX license tag equivalent.

Identify licenses used in a project:

spdx-tool

Identify files matching a given license:

spdx-tool --only-licenses=Apache-2.0 -f

Check the license header before replacing it:

spdx-tool --only-licenses=Apache-2.0 --print-license --line-number src

Replace the license header by the SPDX-License-Identifier header:

spdx-tool --only-licenses=Apache-2.0 --update=spdx src

Build an XML or JSON report of files with their licenses:

spdx-tool --output-xml=report.xml

Documentation

Install

Globally install this crate:

alr install spdx_tool

Add to your project:

alr with spdx_tool

Crate Information

Versions

Authors

  1. ciceron

Maintainers

Maintainers (GitHub pseudo)

Release Date

6 months ago

First Release

12/26/2024

License

Statistics

Dependencies: 0

Dependents: 0

Versions: 1