Skip to content

Lesson 1 of 9 · 24m

Licensing Is the Contract, Not Decoration

Choose a license deliberately, understand what it obligates you to do, and set contributor expectations before the first outside patch.

The license is not metadata for a package registry. It is the legal interface between your project and everyone who copies, modifies, embeds, or sells around it. Picking one because it is popular is like choosing a database because the logo looks serious. The choice decides whether companies can use it, whether downstream patches must come back, and whether contributors can sue each other when money appears.

The three practical families

Permissive licenses — MIT, BSD-2/3-Clause, Apache-2.0 — say: use this for almost anything, preserve notices, do not sue us. MIT is short and widely understood. Apache-2.0 is longer because it includes an express patent grant and retaliation clause, which matters for corporate adoption.

Weak copyleft — LGPL, MPL-2.0, EPL — requires changes to the licensed component itself to stay open, while allowing proprietary applications to link or combine with it under defined conditions.

Strong copyleft — GPL, AGPL — extends openness requirements through derivative work and, in AGPL's case, network use. That is not anti-commercial; it is a deliberate forcing function.

Compatibility is the trap

Licenses are legal programs with weird interop bugs. Apache-2.0 is compatible with GPLv3 but not GPLv2 because of patent and additional-terms mechanics. MIT combines easily almost everywhere. If you depend on GPL code and distribute it together with your work, your project may need to be GPL-compatible whether you like that ideology or not.

MIT dependency + MIT project           simple
Apache-2.0 dependency + GPLv3 project  generally compatible
Apache-2.0 dependency + GPLv2 project  classic compatibility problem
AGPL library + proprietary SaaS        network use can trigger source obligations

When in doubt, read the license text and the FSF/Apache compatibility notes. Do not outsource legal judgment to a one-line package.json field.

Put the signals where tooling can see them

LICENSE                  full canonical text
NOTICE                   attribution or third-party notices when required
package.json             "license": "Apache-2.0"
pyproject.toml           license = { text = "MIT" }
go.mod source headers    SPDX-License-Identifier: Apache-2.0

Use SPDX identifiers consistently in manifests and file headers. GitHub, scanners, enterprise compliance teams, and downstream distributions all consume them. A missing or contradictory license means "no rights granted" in many jurisdictions, not "public domain".

Relicensing is expensive

Once outside contributors land, their contributions are licensed under the inbound terms they used. You generally cannot unilaterally relicense the combined work without permission from every meaningful contributor. If future dual licensing matters, decide early whether you need a contributor license agreement or DCO plus a carefully stated inbound=outbound policy.

Field notes

  • "No license" does not mean free use; it usually means all rights reserved.
  • Changing licenses is partly a legal act and partly a community trust event. Treat both parts seriously.
  • License choice and business model are coupled. If your plan depends on cloud providers paying you, MIT may be too permissive for the strategy.
  • Do not copy a LICENSE file from another project without checking whether it matches your dependencies and intent.
  • Copyright headers should say what is true: project authors, not just your personal name, once outside contributions arrive.

Was this lesson helpful?

Sign in to rate