Spdx_tool

Website:

https://github.com/stcarrez/spdx-tool

Author:
  • ciceron
Maintainer:
  • ciceron <Stephane.Carrez@gmail.com>
License:

Apache-2.0

Version:

0.4.1

Alire CI:

Dependencies: Dependents:

No dependents.

Badge:

SPDX license detection and management tool

#tools #spdx #license

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