Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

πŸ“ƒ Open Source licenses as JSON

License

Notifications You must be signed in to change notification settings

moritzruth-archive/spdx-license-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

spdx-license-data

Open Source licenses as JSON

The data is automatically fetched from these repositories every day:

The information is then merged and committed into the repository if changes were made.

Data

License objects have the following fields:

  • id β€” Short identifier specified by spdx.org/licenses
  • title β€” The license name specified by spdx.org/licenses
  • description β€” A human-readable description of the license
  • howToUse β€” Instructions on how to implement the license
  • note β€” Additional information about the licenses
  • isOsiApproved β€” Whether this license is OSI approved
  • isFsfLibre β€” Whether this license complies with the definition of free software by the FSF
  • permissions (array, see below)
  • conditions (array, see below)
  • limitations (array, see below)
  • text β€” The license text with [placeholders]:
    • [fullname] β€” The full name or username of the copyright owner
    • [login] β€” The copyright owner's username
    • [email] β€” The copyright owner's primary email address
    • [project] β€” The project name
    • [description] β€” The description of the project
    • [year] β€” The current year
    • [projecturl] β€” The repository URL or other project website

Permissions

  • commercial-use β€” The software and derivatives may be used for commercial purposes.
  • modifications β€” The software may be modified.
  • distribution β€” The software may be distributed.
  • private-use β€” The software may be used and modified in private.
  • patent-use β€” The license provides an express grant of patent rights from contributors.

Conditions

  • include-copyright β€” A copy of the license and copyright notice must be included with the software.
  • include-copyright--source β€” A copy of the license and copyright notice must be included with the software in source form, but is not required for binaries.
  • document-changes β€” Changes made to the code must be documented.
  • disclose-source β€” Source code must be made available when the software is distributed.
  • network-use-disclose β€” Users who interact with the software via network are given the right to receive a copy of the source code.
  • same-license β€” Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used.
  • same-license--file β€” Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used.
  • same-license--library β€” Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used, or this condition may not apply to works that use the software as a library.

Limitations

  • trademark-use β€” The license explicitly states that it does NOT grant trademark rights, even though licenses without such a statement probably do not grant any implicit trademark rights.
  • liability β€” The license includes a limitation of liability.
  • patent-use β€” The license explicitly states that it does NOT grant any rights in the patents of contributors.
  • warranty β€” The license explicitly states that it does NOT provide any warranty.

Files

All files are located in the data directory.

  • licenses.json β€” An array of all license objects without the text field.
  • licenses.full.json β€” An array of all license objects.
  • license-names.json β€” An array of all license IDs.
  • licenses/[id].json β€” The license object for [id] without the text field.
  • licenses/[id].txt β€” The license text for [id].
  • licenses/[id].full.json β€” The license object for [id].

They are served under https://license-data.moritzruth.de.

Example: To access data/licenses/0BSD.json, use https://license-data.moritzruth.de/licenses/0BSD.json

NPM

npm

npm install spdx-license-data
# or
yarn add spdx-license-data

Usage:

import licenses from "spdx-license-data"

console.log(`There are ${licenses.length} licenses.`)
console.log(`Title of the AFL-3.0 license: ${licenses.find(license => license.id === "AFL-3.0").title}`)

License

See LICENSE.