ADR 0004 — License¶
- Status: Accepted
- Date: 2026-09-26
- Decides: D5 in
roadmap.md
Context¶
rainbow-fmt is a developer tool intended to be adopted in both open-source
and commercial codebases, embedded in editors and CI systems, and extended
by third-party language packs. The license should minimize adoption
friction and be compatible with the licenses of its dependencies:
tree-sitter and most tree-sitter grammars (MIT), tomlkit (MIT), and
ruamel.yaml (MIT).
Decision¶
rainbow-fmt is licensed under the MIT License. The full text is in
LICENSE at the repository root. The package metadata
declares it as the SPDX expression MIT.
Third-party language packs may choose their own license.
Consequences¶
- Anyone may use, modify, embed, and redistribute rainbow-fmt, including in proprietary products, provided the copyright notice and license text are retained.
- Compatible with the MIT-licensed core dependencies; no copyleft obligations flow to users or plugin authors.
- MIT includes no explicit patent grant. This is accepted as the norm for comparable tools (Prettier, Black, and Ruff are all MIT-licensed).
- Contributions are accepted under the same license (inbound = outbound); no contributor license agreement is required.
Alternatives considered¶
- Apache-2.0. Adds an explicit patent grant, but is longer, more complex to comply with (NOTICE file handling), and not GPLv2-compatible.
- MPL-2.0. File-level copyleft would require modifications to rainbow-fmt's own files to be shared, which adds friction for companies embedding it, with little benefit for a formatter.