# Open Source License Guide: Types, How to Use Them, and How to Choose

> This guide explains the core concepts behind open source licenses and compares common options such as MIT, BSD, Apache, and GPL. It also shows developers how to choose the right license and use others’ open source code while staying compliant, making it useful for GitHub beginners.

- Source: https://www.waytoagi.com/en/kb/learning-path/open-source-licenses-guide
- Original (Feishu, Chinese): https://waytoagi.feishu.cn/wiki/OcAQwSrJfi77ozkO1HvckIDIn6b
- Updated: 2026-12-03

---

> 🔗 Original link: [https://x.com/AdrianPunk115/status/20986...](https://x.com/AdrianPunk115/status/2098673608621199789)

> Adrian Punk · X · @AdrianPunk115 · 2026-09-12 15:22

> 📌 This article is a repost; copyright belongs to the original author. The full text at the original link is authoritative.

![](https://www.waytoagi.com/api/kb-media/Mmz8bIouCoWAjux0WWZcU7lrneg)

Have you ever run into this: you open an open-source project on GitHub, spot a file called **MIT License** sitting in it, and have no idea what it actually means?

I used to wonder about exactly the same thing. Why is it almost everywhere? If I use MIT-licensed code, do I have to open-source my own project? And if I put my code on GitHub without any license at all, can other people still use it? After digging into it, I finally got these common open-source licenses straight.

If you're already a seasoned developer who knows open-source compliance inside out, you can probably skip this one. But if you're still a beginner building small tools, writing Skills, and getting ready to put your work on GitHub, I'd suggest spending a few minutes reading to the end.

My previous career was in compliance, so these questions naturally interest me. Today, drawing on the material I've gathered, I'll try to avoid jargon and explain in plain language what open-source licenses actually are, which ones exist, and how we should choose between them.

Because an open-source license is a genuinely legally meaningful authorization document: it determines whether others may use, modify, distribute, or commercially exploit your code, and what obligations they must fulfill when they do.

Next, I'll translate each common license into plain English and explain:

- What actually counts as open source;

- How open-source licenses can be categorized;

- What MIT, BSD, Apache, GPL, LGPL, AGPL, MPL and others each permit and require;

- Why BSL and SSPL let you see the source code but still can't be called open source;

- What you need to do when using someone else's open-source code;

- How to choose a license when releasing your own project;

- How documentation, images, fonts, datasets, and AI models should be licensed.

> **A quick note first:** This article is a plain-language explainer written by an individual and does not constitute legal advice. For personal projects, following this article is usually enough to make a basic choice. But if your project involves fundraising, M&A, patent litigation, hardware sales, large-scale commercial distribution, or complex license mixing, please have a professional lawyer review it. (Corrections and criticism are welcome if anything here is wrong.)

---


# 1. First, Let's Get Clear on "Open Source"

![](https://www.waytoagi.com/api/kb-media/LrcKbrT2JoriA4xHW7uc5RQUnqb)


## **1. Open source is not "code sitting on GitHub"**

Uploading your code to a public repository only means others can see it; it does not mean they automatically gain the right to use it.

Generally speaking, once code is written, the author automatically holds the copyright — there's no need to put a LICENSE file in place first. A LICENSE solves the authorization question: **which usage rights are you willing to grant to others, and what conditions must they meet when using it.**

So when a repository has no license, the relevant rights typically remain with the author, and others may not use it freely. Others may be able to browse or fork the repository within the limits of GitHub's platform rules, but mere public availability of the code does not mean they have obtained full authorization to copy, modify, redistribute, or incorporate it into a commercial product.

In other words:

> **No LICENSE does not mean no copyright; it's often exactly the opposite — the author holds the copyright but has not explicitly authorized others to use the code. Public code is not the same as open source.**

A genuine open-source license explicitly permits anyone to use, study, modify, and distribute the software, and it cannot discriminate based on who someone is, what industry they're in, or whether they make money. The OSI's Open Source Definition especially stresses that an open-source license cannot prohibit commercial use or restrict any field of use.


## **2. Free, open source, and source-available are three different things**

These three concepts are often conflated:

![](https://www.waytoagi.com/api/kb-media/RQdzbuIXJoGr2mxe6m3cYyrLnZe)

A simple example:

- Chrome can be downloaded for free, but that doesn't mean all of its code is released under an open-source license;

- Chromium is an open-source project;

- A project may let you view its source code while stipulating "may not be used for commercial hosting services" — that's source-available, not open source in the OSI sense.

To judge whether a project is open source, don't just look at what the marketing page says; look at the license it actually uses and whether that license meets the open-source definition.


## **3. Open source does not mean giving up copyright**

Most open-source licenses are built on top of copyright.

The author first holds the copyright, and then uses a license to tell everyone: "As long as you follow these conditions, I permit you to do these things." If a user fails to comply with the conditions, the authorization may lapse, and the author can pursue the matter under copyright law.

So MIT, Apache, and GPL are all built on copyright: **the author retains the copyright while granting usage rights to the public under the conditions set out in the license.**

---

# 2. These licenses can be roughly divided into three categories

![](https://www.waytoagi.com/api/kb-media/HNYXb9JylonL0SxQbttclWKUnDc)

No matter how many more license names you come across later, you can first sort them into these three drawers.


## Category 1: Relatively permissive

Representatives: **MIT, BSD, Apache 2.0**.

They essentially say:

> You may use, modify, and use commercially, and you may also keep your own product closed source. Just remember to retain the original author's copyright and license notice.

These licenses are relatively easy for individual developers and companies to accept.


## Category 2: You can use it, but improvements must be shared

Representatives: **LGPL, MPL 2.0**.

They allow closed-source software to use them, while also expecting that if someone modifies the original library or files, those modifications continue to be made public.


## Category 3: When you release a modified version, related projects must also stay open source

Representatives: **GPL, AGPL**.

GPL mainly focuses on the situation when the software is handed over to someone else; AGPL even takes into account the situation where it is placed on a server for others to use.

A quick table to understand it first:

![](https://www.waytoagi.com/api/kb-media/A80ibq0nOovmknxBCPVcFV6qnNc)

![](https://www.waytoagi.com/api/kb-media/Q6UgbPsQfo8rXfx6uP7chE4Unnb)

---


# 3. MIT: The most common for beginners, and the easiest to understand

MIT can be summed up in one sentence:

> You can take the code and use it, modify it, use it commercially, and keep it closed source, but please retain the original author's copyright notice and the MIT license. If something goes wrong, the original author is usually not liable.

Suppose you find an MIT-licensed small tool on GitHub. You can:

- Use it in your own project;

- Modify it;

- Put it into a commercial product;

- Turn it into a paid service;

- Keep your own project closed source.

The core thing you need to do is retain the original author's copyright notice and the MIT License.


## What projects is MIT suitable for?

- Personal small tools;

- Skills that you are willing to let others freely reuse, including internal templates and workflows;

- Learning projects;

- Development libraries such as JavaScript and Python;

- Projects that you hope more people will use.

If you are making a small tool, want to upload it to GitHub, and have no special commercial plan, **choosing MIT is usually enough.**

The cost of MIT is also clear: others can take your code and turn it into a closed-source commercial product without having to open source their project.

---


# 4. BSD: Very similar to MIT

BSD also allows use, modification, commercial use, and closed source.

Common ones include BSD 2-Clause and BSD 3-Clause. For beginners, you only need to remember:

- BSD 2-Clause has an effect very close to MIT;

- BSD 3-Clause adds one more clause: "Do not use the original author's name to endorse your product."

For example, if a product uses BSD-licensed code released by a university, it can use it normally, but it may not arbitrarily write in advertisements that "this product is officially recommended by this university."

When an ordinary personal project is torn between MIT and BSD, just choose the more familiar MIT. If the community your project belongs to generally uses BSD, you can also follow the community's habit.

---


# 5. Apache 2.0: Like MIT, but places more emphasis on patents

Apache 2.0 likewise allows modification, commercial use, and closed source.

Its main difference from MIT can be captured first with two words: **patents, NOTICE**.


## **What do patents mean?**

Some code may involve contributors' patents. Apache 2.0, within the scope specified by the license, grants the relevant patent licenses to users as well.

In simple terms: it hopes to reduce a kind of risk—where a contributor open-sources code for everyone to use, and later uses a patent covering that contribution to sue users.

This does not mean Apache 2.0 can solve all patent problems, but it is written more explicitly than MIT.


## **What is NOTICE?**

Some Apache projects come with a **NOTICE** file, which you can understand as a list of notices that need to be retained along with the project. If you distribute the relevant software, remember to check and retain it as well.


## When should you choose Apache 2.0?

- Projects with corporate participation;

- SDKs and development frameworks;

- Infrastructure projects;

- When you care more about patent statements.

If you want to keep things simple for a personal small tool, choose MIT. If the project is larger, has more participants, or you care about patents, you can consider Apache 2.0.

---

## VI. LGPL: Your Program Can Stay Closed Source, But Library Modifications Must Be Shared

LGPL is commonly used for software libraries.

> Closed-source software can use this library; if you modify the library itself and distribute it, you are generally required to disclose your modifications to the library.

Example: You develop a closed-source video application that uses an LGPL video library. In most cases, you do not need to open-source the entire video application. However, if you modify the LGPL library and distribute the modified version with your product, you must provide the corresponding source code according to the license.

LGPL also aims to allow users to replace the library. Therefore, when using an LGPL library, pay attention to the requirements regarding dynamic linking, static linking, and relinking.

If you’re not yet familiar with these terms, don’t worry about mastering them right away. When preparing for a commercial release, just tell an experienced person these three things:

1. Which LGPL library you used;
2. Whether you modified it;
3. How you packaged it into your product.


## What Types of Projects Is LGPL Suitable For?

- Audio and video libraries;
- Database drivers;
- Foundational runtime libraries;
- Projects that want to be adopted by commercial software while hoping that improvements to the library remain open.


---


# VII. MPL 2.0: Share Only the Files You Modify

The boundaries of MPL 2.0 are relatively straightforward.

> You only need to open-source the MPL files you modify. Any files you write yourself can remain closed source.

For example, suppose a project contains 100 files, of which 10 come from an MPL-licensed project. If you modify those 10 files and release a product, you typically need to disclose the source code of those 10 files. The other 90 files you wrote yourself can remain closed source.

MPL is suitable for:

- Reusable software components;
- Projects that need to work alongside closed-source code;
- Authors who want others to contribute modifications back without affecting the entire project.

If you find LGPL’s linking rules too complicated to understand, MPL’s “per-file” approach is usually more intuitive.


---


# VIII. GPL: When You Distribute a Modified Version, You Must Provide the Source Code

GPL:

> You may use, modify, distribute, and charge for the software; however, if you distribute a program based on GPL code to others, you typically must also provide them with the corresponding source code and modification rights.

GPL permits commercial use. You can sell GPL-licensed software and charge for services.

## In Which Cases Is Source Disclosure Usually Not Required?

- Running the software only on your own computer;
- Using it only internally within a company;
- Making modifications without distributing them externally.


## In Which Cases Should You Pay Special Attention?

- Delivering an installer package to customers;
- Publishing Docker images;
- Incorporating GPL code into your own program and then releasing it;
- Installing GPL software into hardware devices and selling them.


## Will GPL Force a Company to Open-Source All Its Code?

No, it does not automatically cover all code within a company. It only concerns the GPL-covered program and any “work based on the Program.”

Whether certain code counts as part of the same work sometimes depends on linking methods and program architecture. For personal small projects, there’s no need to panic in advance. For commercial projects, carefully examine the boundaries before release.


## What’s the Difference Between GPL 2.0 and GPL 3.0?

Beginners should remember: these are two distinct versions. Seeing “GPL” alone does not mean they are the same.

You may also encounter:

- **GPL-2.0-only**: You may only use GPL 2.0;
- **GPL-2.0-or-later**: You may choose GPL 2.0 or any later version;
- **GPL-3.0-only**: You may only use GPL 3.0.

If you are choosing a license for a brand-new project and have no compatibility requirements with older projects, it’s generally recommended to start with GPL 3.0.


---


## IX. AGPL: Bringing the Requirements to Online Services

AGPL can be understood as the “network service version of the GPL.”

> If you modify the program and then run it on a server for users to access, you must also give those users an opportunity to obtain the corresponding source code.

Why does it exist?

When ordinary GPL software is used as an online service, users interact with it only through web pages or APIs and never receive a copy of the software. AGPL adds a source code requirement for network-based scenarios.

AGPL still allows charging and providing commercial services. What it requires is that the source code be provided in accordance with the license.

It is suitable for:

- Online collaboration tools;
- Databases and backend services;
- Products primarily delivered via web pages or APIs;
- Projects that want cloud service providers to also disclose their modifications.

Note that some companies are cautious about AGPL. If you particularly hope your project will be widely adopted by large companies, AGPL may create additional friction.

## 10. BSL and SSPL: Source Code Is Visible, But Usage Restrictions Are Stricter

These two types of licenses are primarily used to protect specific business models. They are not considered strictly open source licenses.

**BSL (Business Source License)**

> The source code is publicly viewable, but certain production or commercial uses are temporarily restricted. On a specified future date, the version automatically converts to a designated open source license.

Different BSL projects have very different terms. When you encounter a BSL license, always check the following:

1. Which uses are free;
2. Which uses require purchasing a commercial license;
3. Until what exact date the restrictions apply;
4. Which open source license it converts to after the restriction period.

**SSPL (Server Side Public License)**

> If you use it to provide a service to others, you may be required to open-source the entire suite of related software, including management, monitoring, backup systems, and more.

The scope of what it requires you to open-source can be broader than AGPL, and it has not been approved by the OSI as an open source license.

As a beginner, when you see BSL or SSPL, do **not** treat them the same way as MIT projects. Always read the specific conditions stated by the project carefully.

---


## 11. What Should You Do When Using Someone Else’s Open Source Code?

You don’t need to dive into all the legal details right away. Just follow these five steps to stay safe.

## **Step 1: Find the LICENSE File**

Check the root directory of the repository for:

- **LICENSE**
- **LICENSE.txt**
- **COPYING**

The README may also mention the license. If you cannot find any license information at all, do not assume you can use it freely.

## **Step 2: Clearly Identify the License Name and Version**

MIT is relatively straightforward. When you encounter GPL or LGPL, you must also check whether it is version 2.0, 3.0, or includes **only** / **or-later**.

Different versions of the same project may even use different licenses.

## **Step 3: Clearly Define How You Intend to Use It**

Ask yourself a few questions:

- Is it only for local learning?
- Will you copy the code into your own project?
- Will you modify it?
- Will you distribute the installation package or Docker image to others?
- Will you deploy it on a server to provide an online service?

Different uses come with different requirements.

## **Step 4: Keep What Must Be Kept**

Even permissive licenses like MIT and BSD have requirements. The most common is retaining the original author’s copyright notice and the license text.

In commercial products, third-party license information can be placed in:

- A **LICENSES** directory;
- A **THIRD-PARTY-NOTICES** file;
- An “Open Source Licenses” page in your app;
- The product documentation.

## **Step 5: Provide Source Code When Required**

When using GPL, LGPL, MPL, or AGPL, if your usage triggers the source code disclosure requirement, you must provide the corresponding source code according to the license terms.

If you plan to charge money, deliver to customers, or sell hardware, and you are unsure whether your approach complies, it is best to consult a legal professional.

---


## 12. How to Add a License to Your Own GitHub Project?

The easiest way is to click **Choose a license** when creating a new repository on GitHub and select the desired license.

For an existing repository:

1. Create a file named **LICENSE** in the root directory;
2. Paste the full text of the corresponding license;
3. Fill in the year and copyright holder according to the template;
4. Mention the license in the README.

```markdown
## License

This project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.
```

Do not just write “This project uses MIT” in the README. You must also include the complete LICENSE file.

If your repository contains code, documentation, images, and logos, you can license them separately. For example:

- Code: MIT
- Documentation: CC BY 4.0
- Images: CC BY-NC 4.0
- Logo: All rights reserved

Simply state this clearly in the README.

---


## 13. Can Code Under Different Licenses Be Combined?

Sometimes yes, sometimes no.

For beginners, remember this general rule of thumb:

> Permissive licenses like MIT and BSD are usually easy to incorporate into other projects. Strong copyleft licenses like GPL are much harder to combine with closed-source projects.

Common scenarios:

- MIT code can usually be included in a GPL project;
- GPL code cannot be directly relicensed as MIT and then closed-sourced;
- Apache 2.0 can usually be included in a GPL 3.0 project;
- Apache 2.0 and GPL 2.0-only usually cannot be directly combined.

If you are just building small personal tools, prefer dependencies with clear, simple licensing. When you encounter GPL, AGPL, or combinations of multiple licenses and are unsure, ask the maintainer or someone with more experience before proceeding.

## 14. Which License Should Images, Videos, and Skills Use?

This is easy to confuse, because an image or video Skill often contains two kinds of things at the same time:

1. **The Skill's own code, prompt templates, or workflow files**;

2. **The images, videos, copy, music, and other content that the Skill uses or generates**.

These two kinds of content can use different licenses. For example, the Skill's code might use MIT, the demo images might use CC BY, and the logo retains all rights.

## Common CC Licenses for Documents, Images, and Videos

- **CC BY**: others can use, modify, and use commercially, but must give attribution;

- **CC BY-SA**: can be used, modified, and used commercially, with attribution; when publishing a modified version, the same license must continue to be used;

- **CC BY-NC**: can be used and modified with attribution, but not commercially;

- **CC BY-ND**: can be used and used commercially, but modified versions cannot be published;

- **CC BY-NC-SA**: no commercial use, and modified versions must continue to use the same license;

- **CC BY-NC-ND**: the most restrictive — no commercial use and no publishing of modified versions;

- **CC0**: the author waives as much as possible; usually even attribution is not required.

A simple way to remember:

- **BY** = attribution required;

- **SA** = modified versions must use the same license;

- **NC** = no commercial use;

- **ND** = no publishing of modified versions.

The phrase "no changes" here is easy to misunderstand. ND usually restricts **sharing modified versions outward**; modifying something purely for your own use and publicly publishing a modified version need to be treated separately.

## How Do You Protect the Templates Inside an Image or Video Skill?

![](https://www.waytoagi.com/api/kb-media/TSAbbKmpiozImUxoSVKcWg1OnNf)

If an image-generation Skill contains a large number of prompts, style templates, parameter combinations, and workflows, that content is often the most valuable part of the Skill. In that case, don't apply MIT or Apache 2.0 to the whole repository, because both licenses allow others to copy, modify, and use it commercially — even to put it into a closed-source product.

You can choose based on how much protection you want:

**Option 1: Don't publish the templates; expose only the way to call them**

This is the strongest form of protection. Keep the templates and workflows on a private server so users can only call them through the Skill or an API and cannot see the full templates.

The client code you make public can use MIT, while the server-side templates stay private. This makes it easy for others to use the Skill while reducing the risk of the templates being copied wholesale.

**Option 2: Publicly viewable, but all rights reserved**

If the templates must go into a public repository, you can leave them without an open-source license and clearly state:

> Templates, prompts and workflows: All rights reserved.

This means others can see the content but do not automatically get permission to copy, modify, republish, or use it commercially. GitHub's platform rules may still allow users to browse and fork the repository, so a public repository cannot stop others from "seeing" the templates.

**Option 3: Open-source the code, license the templates separately**

You can also split the licensing within a single repository:

- The Skill's program code: MIT or Apache 2.0;

- Prompts, templates, and workflows: all rights reserved, or a separate content license;

- Sample images and videos: CC licenses as appropriate;

- Logo and brand names: rights reserved.

Then spell out the scope in the README and in each directory so others don't mistakenly assume that everything in the repository is under MIT.

If you want to allow others to learn from and use the templates non-commercially, consider **CC BY-NC-ND**: it requires attribution, prohibits commercial use, and does not allow public release of modified versions. But it is not an open-source license, and whether it suits prompts and templates also depends on whether that content meets the originality threshold required by local copyright law.

There's also a practical point to keep in mind: copyright usually protects the specific wording and expression of a template, not necessarily the ideas, visual style, production method, or parameter logic behind it. Prompts that are too short or too generic may also struggle to obtain adequate copyright protection. If the templates are a core commercial asset, the safest approach is still not to publish the full content.

Finally, **licensing the Skill's templates and licensing the generated images are two different things.** Even if you own the templates, whether the generated images can be used commercially still depends on factors such as the model platform's terms, input materials, fonts, music, likeness, and trademarks.

## **Fonts**

Fonts commonly use OFL 1.1. It generally allows use, modification, and embedding, and also allows inclusion in commercial software.

## **Data and AI Models**

Data may also involve privacy and provenance. For AI models, you also need to look separately at the weights, code, training data, platform terms, and usage restrictions.

So if you see "Open" in the name of a dataset, model, or Skill, don't immediately take it to mean you can use it commercially however you like.

---

# 15. How to Choose? Just Look at the Answers

## 1. I’ve built a small tool, script, or Skill and want to upload it to GitHub

If the project does not contain any core templates that need to remain confidential or have usage restrictions, choose **MIT**.

It’s simple, widely understood, and easy for others to comprehend. For most personal projects where you’re happy for others to freely reuse your work, this is the most hassle-free choice.

If your project includes prompts, templates, data, or workflows that you want to protect, do not license the entire repository under MIT. Separate these sensitive parts first, then decide individually whether to make them public and which license (if any) to apply.


## 2. This is an enterprise project and I care about patents

Choose **Apache 2.0**.


## 3. I’ve built a library and want closed-source software to be able to use it, but anyone who modifies the library must open-source their changes

Choose **LGPL**.


## 4. I want to apply the license on a per-file basis — only the files that are modified need to be disclosed

Choose **MPL 2.0**.


## 5. I want any modified versions released by others to remain open source

Choose **GPL 3.0**.


## 6. My project is primarily an online service, and I want anyone who turns it into a SaaS product to also open-source their modifications

Choose **AGPL 3.0**.


## 7. I want to prevent cloud providers from using it to offer competing services

You may want to look into the Business Source License (BSL), commercial licenses, or dual licensing. This enters the realm of business models and is usually not something individual beginners need to consider right away.


## 8. I’ve built an image or video Skill, and the templates inside need protection

Do not license the entire Skill under MIT. MIT would allow others to copy, modify, and commercially use your templates and workflows.

Better approaches include:

- **Maximum protection:** Keep the templates private on your own server and only expose the Skill or API interface;

- **Open-source the code, protect the templates:** License the program code under MIT or Apache 2.0, and clearly mark the template directory with “All rights reserved”;

- **Allow learning but prohibit commercial use and public derivatives:** Consider using CC BY-NC-ND for the templates, and explicitly state that it is not an open-source license;

- **Want the templates to be freely usable:** Then consider CC BY or CC BY-SA.

Whichever option you choose, clearly document in the README the licensing scope for code, templates, example assets, and generated content separately.

If these templates are your core competitive advantage, prioritize keeping them private. A statement in a public repository can provide a legal boundary, but it cannot technically prevent others from viewing or copying the content.


---

## 16. Final Key Takeaways

1. Simply uploading code to GitHub does not automatically make it an open-source project.

2. Without a LICENSE file, you still retain copyright — others simply have no explicit permission to use it.

3. For personal small tools that you want to open-source simply, MIT is usually sufficient.

4. For enterprise projects or when patents matter, consider Apache 2.0.

5. When using GPL, AGPL, LGPL, or similar licenses, always double-check the distribution and source code requirements.

6. Never create your own new license from scratch. Prefer well-established, standard licenses.

There is no universally “best” license — it all depends on how you want others to use your work.

If you’re like me and still in the “learn by building” stage, there’s no need to master dozens of licenses from day one. Just clearly understand your own usage scenarios and pick from the most common licenses. That alone will help you avoid most problems.
