A short copyleft license for code, websites, and digital works. Attribution required, derivatives stay open.
Canonical plain text: /license/bysa-code-v2.txt · 中文 · Version 1.0 · First published September 2026
New works should adopt Version 3 (中文). Works already published under 2.0 stay under 2.0, and the terms on this page still apply to them.
You are free to:
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
The work is provided "as is", without warranties of any kind, express or implied, including merchantability, fitness for a particular purpose, and non-infringement.
This license grants copyright and patent rights only. No trademark or name rights are granted, so you may not use the "CaelLab" name to endorse your version, and no support, maintenance, or updates are promised.
The copy below is reproduced from the canonical plain text file. That file is the version to copy, cite, or link to, and the text itself is dedicated to the public domain under CC0 1.0, so you can adapt it freely.
https://www.caellab.com/license/bysa-code-v2.txt
Version 1.0 was MIT with a ShareAlike sentence bolted on. That created a real contradiction and left most questions unanswered. Version 2.0 fixes the conflict and fills the gaps.
| Change | 1.0 | 2.0 |
|---|---|---|
| Sublicensing | Granted | Removed |
| Definitions of Work / Source Code / Distribute | None | Section 0 |
| "or any later version" upgrade path | None | Section 6 |
| Patent grant | None | Section 2 |
| Attribution requirements | Vague | Section 3.1 (a–e) |
| Source availability | One sentence | Section 3.2 |
| Trademark / name reservation | None | Section 5 |
| Termination & 30-day cure | None | Section 7 |
| Limitation of liability | None | Section 9 |
| Text of this license | Verbatim only | CC0 1.0 |
Works already published under 1.0 stay under 1.0 unless their copyright holder says otherwise. New works should adopt 2.0.
Credit the author. Keep the copyright notice and the license text intact, name the Licensor, and link back to the original when you publish over the network.
Mark your changes. Say that you modified the work and identify which files you changed.
Ship the source. If you distribute a build, bundle, or minified copy, the complete corresponding source of that same version goes with it, under this license.
ShareAlike. Modified versions must be released under this license, or a later version of it. No extra restrictions, no DRM on top.
| Feature | MIT | Apache-2.0 | GPLv3 | BY-SA 2.0 |
|---|---|---|---|---|
| Commercial use | ✓ | ✓ | ✓ | ✓ |
| Private use | ✓ | ✓ | ✓ | ✓ |
| Modification | ✓ | ✓ | ✓ | ✓ |
| Explicit patent grant | ✗ | ✓ | ✓ | ✓ |
| "or later version" clause | ✗ | ✗ | ✓ | ✓ |
| Sublicensing | ✓ | ✓ | ✗ | ✗ |
| Closed-source derivatives | ✓ | ✓ | ✗ | ✗ |
| SaaS use triggers copyleft | ✗ | ✗ | ✗ | ✗ |
| Termination with cure period | ✗ | ✓ | ✓ | ✓ |
| License length | Short | Medium | Long | Medium |
For GitHub and other code repositories, place a file named LICENSE (no extension) in the root directory with the full license text. You may also add a short header to each source file:
// Copyright (c) 2026 [Your Name] // Licensed under the CaelLab BY-SA Code License, Version 2.0 // or any later version. https://www.caellab.com/license/bysa-code-v2.txt // Source: https://github.com/you/repo
<!-- Copyright (c) 2026 [Your Name] Licensed under the CaelLab BY-SA Code License, Version 2.0 or any later version. https://www.caellab.com/license/bysa-code-v2.txt Source: https://github.com/you/repo -->
/* * Copyright (c) 2026 [Your Name] * Licensed under the CaelLab BY-SA Code License, Version 2.0 * or any later version. https://www.caellab.com/license/bysa-code-v2.txt * Source: https://github.com/you/repo */
# Copyright (c) 2026 [Your Name] # Licensed under the CaelLab BY-SA Code License, Version 2.0 # or any later version. https://www.caellab.com/license/bysa-code-v2.txt # Source: https://github.com/you/repo
Does this apply to websites and web apps? Yes. The term "Work" covers any code, markup, stylesheets, scripts, or configuration files used to build or run a website or application.
Can I use this in proprietary software internally? Yes. The ShareAlike obligation only triggers when you distribute the work to others.
If I only run it as a network service, must I publish my changes? No. Running the work on your own systems, including serving it as a website or API, is not Distribution under 2.0. If you want that obligation, use AGPL-3.0 instead.
As a user, what does "or any later version" mean? You may follow the rules of 2.0, or the rules of any final version CaelLab releases under a higher, unsuffixed version number at the canonical URL. Development, draft, preview, experimental, and modified versions, including forks of this license text, are not "later versions". As an author, the clause means people using your code can upgrade without asking you.
Can I relicense a modified version as MIT? No. Section 3.3 requires Modified Versions to stay under this license, and Section 1 does not grant sublicensing rights.
Can I use this for docs, images, or articles? Use the CaelLab BY-SA Content License for non-code works instead, so the terms fit the medium.
Is the text on this page the license itself? The binding version is the plain text file linked above; the copy on this page is reproduced from it for reading. When you cite the license, link to the plain text URL, not to this page.
Can I modify the license text? Yes. The text is dedicated to the public domain under CC0 1.0, so you may copy and adapt it. A modified text is not the CaelLab BY-SA Code License, and you may not use the CaelLab name to promote it.
Can I dual-license? Only the copyright holder can. A licensor may offer the same work under another license in addition to this one, but a recipient of the work cannot add or swap licenses.
Is this an OSI-approved license? No. It is a custom license, not reviewed or approved by the OSI or the FSF. Some companies have policies that block custom licenses, so check before adopting it for critical projects.
CaelLab is not a party to its public licenses. Notwithstanding, CaelLab may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the CaelLab public licenses is dedicated to the public domain under the CC0 1.0 Universal Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a CaelLab public license or as otherwise permitted by CaelLab, CaelLab does not authorize the use of the trademark "CaelLab" or any other trademark or logo of CaelLab without its prior written consent. For the avoidance of doubt, this paragraph does not form part of the public licenses.
CaelLab may be contacted at caellab.com.
The CC and CC0 marks are trademarks of Creative Commons and are used here to indicate the license of the license text. See also License:CC 0.