🚀SPDX License Identifier
Also known as SPDX, SPDX-License-Identifier, SPDX ID, License Identifier
A short, fixed name for a license, like MIT or Apache-2.0, that tools can read.
Think of it like
It is like a short code on a food box. A scanner reads it and knows what is in it.
Example
Lucy's company must list every license in its app. A tool reads the SPDX IDs in 900 packages and makes the list in seconds.
Why it matters
Big apps use hundreds of packages. Exact, short names let a tool check them all for license problems.
Definition
Example code
javascript
// SPDX-License-Identifier: Apache-2.0
export function add(a, b) { return a + b; }Common mistake
Key takeaways
- 1Exact names. One fixed ID per license.
- 2Machine-readable. Tools can scan them at once.
- 3In every file. One comment line at the top.