公共许可 · 版本 2.0

CaelLab BY-SA Code License 2.0 (zh-hans)

一份简短的 copyleft 许可,适用于代码、网站与数字作品。要求署名,衍生作品必须保持开放。

虚舟实验室(CaelLab) 发布 · 「虚舟实验室」是 CaelLab 的中文官方名称,指同一团队,本页两个名称含义相同 · 正式文本(英文) · English · 版本 1.0 · 首次发布于 2026 年 9 月

本许可有更新版本。

新作品建议采用 Version 3(中文);已按 2.0 发布的作品仍适用 2.0,本页条款对它们继续有效。

虚舟实验室 Deed
本页是下方许可协议的通俗摘要,不能替代许可协议本身。中文内容仅供参考,具有法律约束力的版本是英文原文。

您可以自由地:

只要你遵守许可协议条款,许可人就无法收回你的这些权利。

惟须遵守下列条件:

本作品按"原样"提供,不提供任何形式的担保,无论是明示的还是暗示的,包括但不限于对适销性、特定用途适用性和非侵权性的担保。

本许可协议只授予著作权与专利权。不授予任何商标或名称使用权,因此你不得用「CaelLab」「虚舟实验室」名称宣传你的版本;许可人也不承诺提供支持、维护或更新。

以上中文摘要不具法律效力。许可条款以 英文原文 为准,本许可不提供官方译本。

许可正文(英文原文)

CC CC0 CC0 1.0 Universal — 公有领域贡献

下面这份正文是上面那个纯文本文件的副本。许可正文只有英文版本、不提供译本;引用时请链接纯文本 URL。文本本身以 CC0 1.0 贡献至公有领域,你可以自由改编它。

正式文本地址
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

2.0 改了什么

1.0 是把一份 MIT 硬塞了一句 ShareAlike 进去,这造成了一处真实矛盾,而且大多数问题都没有答案。2.0 修掉了那个冲突,并把缺口补齐。

变更 1.0 2.0
再许可(sublicense) 授予 移除
Work / Source Code / Distribute 的定义 无 第 0 节
"或任何后续版本"升级路径 无 第 6 节
专利授权 无 第 2 节
署名要求 模糊 第 3.1 节 (a–e)
源代码可得性 一句话 第 3.2 节
商标 / 名称保留 无 第 5 节
终止与 30 天补正 无 第 7 节
责任限制 无 第 9 节
本许可的文本 仅限原样复制 CC0 1.0

已经按 1.0 发布的作品仍然适用 1.0,除非其版权持有人另有说明。新作品应采用 2.0。

你必须做什么

署名。 保留版权声明和许可文本,标明许可人,通过网络发布时附上指向原文的链接。

标注你的修改。 说明你修改了本作品,并指出改了哪些文件。

提供源代码。 如果你分发的是构建产物、打包文件或压缩代码,必须同时提供同一版本完整的相应源代码,并同样以本许可授权。

相同方式共享。 修改版必须以本许可协议或其后续版本发布。不得附加额外限制,不得加上 DRM。

与其他许可对比

特性 MIT Apache-2.0 GPLv3 BY-SA 2.0
商业使用 ✓ ✓ ✓ ✓
私有使用 ✓ ✓ ✓ ✓
修改 ✓ ✓ ✓ ✓
明示专利授权 ✗ ✓ ✓ ✓
"或后续版本"条款 ✗ ✗ ✓ ✓
再许可(sublicense) ✓ ✓ ✗ ✗
闭源衍生作品 ✓ ✓ ✗ ✗
用作网络服务即触发 copyleft ✗ ✗ ✗ ✗
违约终止含补正期 ✗ ✓ ✓ ✓
许可长度 短 中 长 中

使用示例

在 GitHub 等代码仓库中,把完整许可文本放进根目录下名为 LICENSE 的文件(无扩展名)。你也可以在每个源文件头部加一段简短声明:

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
推荐写 "or any later version"。 它让使用者能自行迁移到未来的每一个正式版本,虚舟实验室发布新版本时你的代码不会被永远钉在 2.0;而第 6 节已经把可跟随的范围限定为虚舟实验室自己发布的、版本号不带后缀的正式版本,所以 fork 和预览版无法借此混进来。只有在你必须锁定某个确切版本时才去掉这句话,例如要保证构建可复现,或要满足审计要求。无论如何,这只有在你就是该作品的版权持有人时才由你决定。

常见问题

这个许可适用于网站和 Web 应用吗? 适用。"Work" 涵盖用于构建或运行网站、应用的全部代码、标记、样式表、脚本与配置文件。

可以在闭源软件里内部使用吗? 可以。ShareAlike 义务只在对外分发时触发。

只当作网络服务运行,需要公开修改吗? 不需要。在自己的系统上运行本作品(包括作为网站或 API 对外提供服务)在 2.0 中不构成分发。如果你需要这项义务,请改用 AGPL-3.0。

作为使用者,"或任何后续版本"是什么意思? 你可以按 2.0 的条款,或按虚舟实验室在正式地址发布的、版本号更高且不带后缀的正式版本(final release)的条款行事。开发版、预览版、实验版以及被修改过的版本(包括别人改过的许可文本)都不属于"后续版本"。作为作者,它意味着使用者可以自行升级,不必再问你。

可以把修改版改用 MIT 授权吗? 不可以。第 3.3 节要求衍生作品保持本许可协议,且第 1 节不授予再许可权利。

可以用于文档、图片或文章吗? 非代码作品请改用 CaelLab BY-SA Content License,条款更契合该媒介。

本页上的文本就是许可本身吗? 具有约束力的是上面链接的纯文本文件,本页这份只是便于阅读的副本。引用时请链接纯文本 URL,而不是本页。

这份中文版有法律效力吗? 没有。本许可只有英文版本、不提供官方译本,中文内容仅供理解参考;发生歧义时一律以英文原文为准。

可以修改许可文本吗? 可以——文本以 CC0 1.0 贡献至公有领域,你可以复制和改编。但修改后的文本不是 CaelLab BY-SA Code License,且不得用「CaelLab」「虚舟实验室」名称推广它。

可以双许可吗? 只有版权持有人可以。许可人可以在本许可之外把同一作品以其他许可提供,但作品的接收者不能自行增加或替换许可。

这是 OSI 认证的许可吗? 不是。它是自造许可,未经 OSI 或 FSF 审核批准。部分公司有禁止使用自造许可的政策,用于关键项目前请先确认。

虚舟实验室 Notice

虚舟实验室(CaelLab) 不是其公共许可协议的当事方。尽管如此,虚舟实验室可以选择对其发布的材料适用其公共许可之一,此时虚舟实验室将被视为"许可人"。虚舟实验室公共许可的文本以 CC0 1.0 通用公有领域贡献 贡献至公有领域。除用于表明材料系依虚舟实验室公共许可共享,或经虚舟实验室另行许可外,虚舟实验室不允许在未经事先书面同意的情况下使用「CaelLab」「虚舟实验室」商标或虚舟实验室的任何其他商标与标识。为避免疑义,本段不构成公共许可的一部分。

联系方式:caellab.com。

CC 与 CC0 标记是 Creative Commons 的商标,此处用于标示许可文本的授权方式。另见 License:CC 0。