宽松型SPDX MIT
MIT 许可证:许可证全文
以下是标准文本,除版权行里的占位符外一字未改。把 <year> 与 <copyright holders> 换成你的信息即可——不应做别的修改。
纯文本,含版权占位符
MIT License Copyright (c) <year> <copyright holders> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
怎么安装
- 存为
LICENSE放在仓库根目录,不加扩展名。GitHub、GitLab 与 npm 都会识别这个名字。 - 填好版权行首次发布年份与权利人。写成 2020–2026 这样的区间也可以。
- 随每份拷贝一起分发放进安装包、安装器或「关于」页面——至少有一份用户真能拿到。
- 在清单文件里引用package.json 写
"license": "MIT",pyproject.toml 写license = "MIT"。
改字就失效了
你可以在声明上方加自己的版权行,但不能重写授权段落、删减免责声明或去掉条款——许可证就是那段完整文本,不是它的摘要。