Public License · Version 2.0

CaelLab BY-SA Code License 2.0

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

A newer version of this license is available.

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.

CaelLab Deed
This is a human-readable summary of (and not a substitute for) the license below.

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.

Full License Text

CC CC0 CC0 1.0 Universal — Public Domain Dedication

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.

Canonical URL
https://www.caellab.com/license/bysa-code-v2.txt
CaelLab BY-SA Code License Version 2.0 https://www.caellab.com/license/bysa-code-v2.txt TERMS AND CONDITIONS 0. DEFINITIONS "License" means the CaelLab BY-SA Code License, Version 2.0, whose text is published at https://www.caellab.com/license/bysa-code-v2.txt, and any later version of it as defined in Section 6. "Licensor" means the individual or legal entity that holds copyright in the Work and grants this License. "You" and "Your" mean an individual or legal entity exercising rights under this License. "Work" means the software, source code, markup, stylesheets, scripts, configuration files, assets, and documentation to which the Licensor has attached this License. "Source Code" means the preferred form of the Work for making modifications to it, together with the build scripts, dependency manifests, and documentation needed to reproduce a corresponding Object Code. "Object Code" means any form of the Work other than Source Code, including compiled, minified, bundled, transpiled, or otherwise generated forms. "Modified Version" means any work based on or derived from the Work in which the Work has been translated, adapted, altered, or extended. A work that merely links to, references, or aggregates the Work without modifying it is not a Modified Version. "Distribute" means to reproduce, publish, upload, transfer, or otherwise make the Work or a Modified Version available to any third party, including by publishing it in a repository, shipping it inside a product, or bundling it with a template, theme, or application. Making copies for Your own internal use, or running the Work on Your own systems to process data or serve requests, is not Distribution for the purposes of this License. "Contribution" means any work of authorship, including the original Work and any modification or addition to it, that is intentionally submitted to the Licensor for inclusion in the Work. "Contributor" means the Licensor and any individual or legal entity on behalf of whom a Contribution has been received by the Licensor and incorporated into the Work. 1. COPYRIGHT LICENSE Subject to the terms and conditions of this License, each Contributor grants You a worldwide, non-exclusive, royalty-free copyright license to reproduce, modify, prepare Modified Versions of, publicly display, publicly perform, Distribute, and otherwise use the Work for any purpose, including commercial purposes. The rights granted in this Section do not include the right to sublicense. Permission for any third party to use the Work must be granted under this License. 2. PATENT LICENSE Subject to the terms and conditions of this License, each Contributor grants You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this Section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 3. CONDITIONS FOR DISTRIBUTION 3.1 Attribution. If You Distribute the Work or a Modified Version, You must: (a) retain all copyright, patent, and attribution notices from the Source Code of the Work, including this License; (b) credit the Licensor by name, or by the nickname the Licensor uses, and identify the title of the Work; (c) include a copy of this License; (d) include a prominent statement that You modified the Work, and identify the files or parts You changed, when You have done so; and (e) where the Work is Distributed over a network, link to the URL of this License: https://www.caellab.com/license/bysa-code-v2.txt 3.2 Source Code Availability. Any Distribution of the Work or a Modified Version in Object Code or any other non-Source form must be accompanied by the complete corresponding Source Code of the same version, made available under this License, at no additional charge, through a publicly accessible location or by another reasonable means. If the Work is Distributed as part of a larger work, the corresponding Source Code of the Work must also be made available. 3.3 ShareAlike. A Modified Version may be Distributed only under this License or a later version of this License as defined in Section 6. You may not impose any further restrictions, additional license terms, or technological measures on the Work or a Modified Version that would limit the rights granted by this License. 3.4 Third-Party Material. You may combine the Work with material under another license, provided that You comply with that license and that recipients of the combined work can still exercise the rights granted by this License in the Work itself. 4. CONTRIBUTOR REPRESENTATIONS You represent that You are legally entitled to grant the rights granted in this License for each of Your Contributions. If Your employer or educational institution has rights to intellectual property that You create, You represent that You have received permission to make the Contribution on behalf of that party, or that the party has waived such rights. 5. NO TRADEMARK LICENSE This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work. In particular, You may not use the name "CaelLab" to endorse or promote a Modified Version without prior written permission. 6. LATER VERSIONS OF THIS LICENSE CaelLab may publish revised or new versions of this License from time to time. Each version is given a distinguishing version number. A "later version" is a version of this License that meets all of the following: (a) it is published by CaelLab at the canonical URL of this License, https://www.caellab.com/license/bysa-code-v2.txt, or at a URL that CaelLab names as the successor to that URL; (b) it carries a version number higher than the version You are following; and (c) CaelLab designates it as a final release, and its version number carries no suffix or qualifier such as "-alpha", "-beta", "-rc", "-draft", "-preview", or "-experimental". Versions that are not final releases, including development, draft, preview, experimental, provisional, and modified versions, and versions released by anyone other than CaelLab, are not later versions, whatever they are called. If the Work specifies that a later version of this License applies, such as "Version 2.0 or any later version", You may follow the terms of that version or the terms of any later version as defined above. If the Work specifies a version number and does not include "or any later version", You may follow only that version. 7. TERMINATION AND REINSTATEMENT 7.1 This License and the rights granted under it terminate automatically if You fail to comply with any of its terms and conditions. 7.2 Your rights are automatically reinstated: (a) as of the date the violation is cured, if You fully cure the violation within 30 days of becoming aware of it; or (b) permanently, if the Licensor expressly reinstates Your rights in writing. 7.3 When Your rights terminate under Section 7.1, the rights of any recipient who received the Work or a Modified Version from You remain in effect, provided that recipient remains in full compliance with this License. 7.4 Sections 0, 5, 8, 9, and 11 survive termination of this License. 8. DISCLAIMER OF WARRANTY UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, THE LICENSOR AND EACH CONTRIBUTOR PROVIDE THE WORK ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE WORK AND ASSUME ANY RISKS ASSOCIATED WITH YOUR EXERCISE OF PERMISSIONS UNDER THIS LICENSE. 9. LIMITATION OF LIABILITY IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, UNLESS REQUIRED BY APPLICABLE LAW (SUCH AS DELIBERATE AND GROSSLY NEGLIGENT ACTS) OR AGREED TO IN WRITING, SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING AS A RESULT OF THIS LICENSE OR OUT OF THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES), EVEN IF SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 10. ACCEPTANCE You are not required to accept this License. However, nothing else grants You permission to use, modify, or Distribute the Work. By exercising any of the rights granted in Sections 1 or 2, You accept and agree to be bound by the terms of this License. 11. SEVERABILITY AND INTERPRETATION If any provision of this License is held to be unenforceable, that provision shall be reformed only to the extent necessary to make it enforceable, and the remaining provisions shall remain in full force and effect. Nothing in this License is intended to restrict any use of the Work that is permitted by applicable law without a license, including fair use and fair dealing. This License does not create any obligation on the part of the Licensor to provide support, maintenance, updates, or new versions of the Work. 12. HOW TO APPLY THIS LICENSE To apply this License to Your Work, attach the following notice, replacing the bracketed fields with Your own information: Copyright (c) [YEAR] [AUTHOR] Licensed under the CaelLab BY-SA Code License, Version 2.0. Source: [URL] Adding "or any later version" is recommended, so that recipients can follow future final versions on their own, without waiting for You to update every copy: Licensed under the CaelLab BY-SA Code License, Version 2.0 or any later version. Only final versions published by CaelLab under Section 6 can be followed this way. Leave "or any later version" out to keep recipients on this exact version. END OF TERMS AND CONDITIONS

What's New in 2.0

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.

What You Must Do

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.

Comparison

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

Examples

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:

JavaScript / TypeScript
// 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
HTML
<!--
  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
-->
CSS / SCSS
/*
 * 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
 */
Python
# 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
We recommend "or any later version". It lets recipients move to each future final version on their own, so your code does not get stranded on 2.0 when CaelLab ships a new one — and Section 6 already limits what can be followed to CaelLab's own final, unsuffixed releases, so a fork or a preview build cannot slip in this way. Leave the phrase out only if you must pin an exact version, for example to keep builds reproducible or to satisfy an audit. Either way, this only applies if you are the copyright holder of the work.

FAQ

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 Notice

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.