Before You Open Source It: How to Pick a License for Your Vibe Project
MIT, Apache-2.0, GPL-3.0, AGPL-3.0, or BSL 1.1? A plain-language decision guide for solo developers: four questions, a comparison table, and a full worked example. All example projects, people, and numbers in this guide are fictional.

Your vibe-coded side project finally works. The interface is smooth, your friends say it is genuinely useful. The easiest thing to do next is to hit “make public,” pick whatever license sits at the top of the list — MIT, that looks fine — and move on. Hold on a second. A license feels like nothing the moment you click it, but it decides what other people can do with your code, whether you can change your mind later, and what cards you still hold three years from now when someone is making money off your project.
One thing first: every project, person, and number in the worked example below is fictional, invented only to walk through the decision clearly. And a word on scope: this site has already published AI Code License Risks, which covers the licensing risks of AI-generated code itself, and Vibe Project Open Source Release Guide, which covers the whole release process from README to hitting publish. This guide covers one thing only — which license to pick before you publish. It does not repeat the risk checklist or the release steps. GitHub’s recent open-source license compliance feature news is a platform announcement, not a licensing decision, so it is out of scope here too.

1. What a license actually controls
Start with the basic fact: the moment you write code, the copyright is yours. Putting it online in public does not mean other people can use it. A public repository with no license can be looked at and forked for fun — that permission comes from the platform’s terms of service — but nobody may modify it, put it in their own product, or sell it. A license is the permission slip you write yourself: which rights you hand out, and what conditions come attached.
So picking a license is not paperwork. It answers four very concrete questions: first, can someone take your code and sell a closed-source product built on it; second, if someone modifies your code, do they have to share their changes; third, after someone uses your code, can they turn around and sue you over a patent; fourth, can anyone freely use your name, project name, and trademark. Different licenses are just different answers to these four questions.
One more thing most people miss: a license covers copyright and patents for the code, not your project name, logo, interface design, or the data inside it. Protecting a name means registering a trademark separately; controlling training data means writing a separate data-use statement. Expecting one LICENSE file to handle everything is the most common mistake in license selection.
2. Five common licenses, one comparison table
For an individual developer, you do not need to read all dozens of licenses. Understand these five and you will cover almost every case. The full comparison is in the table below; the text here explains who each license suits best.

MIT: the simplest choice. The whole text is about two hundred English words, and it has one condition: anyone who uses your code must keep your copyright notice and the license text. People can use it commercially, close the source, and modify it without sharing. It fits projects where you just want the code to spread as far as possible and do not care what others do with it. The catch is right there too: it says nothing explicit about patents. If someone contributes code covered by a patent and later causes trouble over it, MIT will not help you much.
Apache-2.0: MIT with an upgrade. It keeps MIT’s freedom and adds two things: contributors grant an explicit patent license, and anyone who sues over patents in the project automatically loses that patent license. It also asks people to note which files they changed and to keep the NOTICE file, if one exists. A few more lines of conditions buy you real protection, which is why many companies and large projects prefer it — it makes their lawyers relax. If you want your project to be something companies can adopt without worry, Apache-2.0 is usually the safer default.
GPL-3.0: changes must come back open. This is a strong copyleft license: anyone who distributes a modified version must release the whole work under the same GPL-3.0, source code included. It also includes an explicit patent grant. It fits projects where you want improvements to flow back to the community — someone builds something better on your shoulders, and it has to be shared too. Note the trigger word, though: “distribute.” If someone runs your code as a web service and users only reach it through a browser, that is not distribution, so nothing has to be shared.
AGPL-3.0: services count too. AGPL-3.0 differs from GPL-3.0 in exactly one key place: if someone runs a modified version as a network service for other people to use, they must offer the source code to those users. That matters a lot for most vibe projects, because many of them are websites, mini-program backends, or online tools — and the most likely thing someone does with them is deploy them as a service. If your biggest worry is “someone tweaks it, puts it online, makes money, and shares nothing,” AGPL-3.0 was written for that scenario.
BSL 1.1: first, be clear — it is not an open-source license. The full name is the Business Source License, created by MariaDB. The deal is: the code is public, you can read it, modify it, and use it for non-production purposes, but production use is restricted unless the licensor grants an Additional Use Grant. On the Change Date, or on the fourth anniversary of a version’s first public distribution — whichever comes first — that version automatically converts to the Change License named in advance, which must be GPL-2.0 or a GPL-2.0-compatible open-source license, commonly Apache-2.0. In short, BSL 1.1 is “charge for a while, then open source,” suited to solo developers who want to earn from a project first and still give the community a firm open-source date. But do not market it as open source: it is not on the Open Source Initiative’s approved list, and GitHub does not count it as one either.
Beyond these five, there is MPL-2.0, a “weak copyleft” license: only the files you modify must stay open, while files you add yourself can stay closed — a good fit for libraries and components. But if you are picking a license for the first time, get the five above straight first; MPL-2.0 can wait.
3. Four steps to a decision — no guessing
Picking a license by feel is how people end up regretting it. Walk through these four steps, answer one question at each, write the answers down, and the license will mostly pick itself.
Step 1: What do you want? Figure out why you are open-sourcing at all. If you only want more people to use it and build a reputation, go permissive. If you want improvements to come back and the community to grow the project with you, go copyleft. If you want to earn from it first and open it later, look at a source-available license like BSL 1.1. Different goals give completely different answers. If you honestly do not know what you want yet, default to Apache-2.0 — it sits in the most stable spot between freedom and protection.
Step 2: Can someone take it closed-source and make money? This is the most important fork in the road. If you do not care, MIT and Apache-2.0 both work. If you do care — if the idea of someone selling your code without sharing anything back bothers you — head toward GPL-3.0 or AGPL-3.0. Get this one wrong and the rest does not matter. Here is a practical test: picture a big company rebranding your project, selling it, and never mentioning you. Can you live with that? If yes, go permissive. If no, go copyleft.
Step 3: How will people actually use your project? If people mainly download the code, run it, and build it into their own software, GPL-3.0 is enough. If they mainly deploy it as a web service that users reach through a browser, GPL-3.0 cannot reach that use — you need AGPL-3.0. Many vibe projects are web apps, so this step often pushes the answer straight to AGPL-3.0. On the other hand, if your project is a command-line tool or a desktop app that nobody is likely to run as a service, the difference between GPL-3.0 and AGPL-3.0 barely matters.
Step 4: Do patents and trademarks matter to you? If your project involves an algorithm you worked out yourself, or you worry someone might come after you with a patent claim one day, Apache-2.0, GPL-3.0, and AGPL-3.0 all carry an explicit patent grant. MIT does not. Trademarks need separate thought: no license protects your project name or logo. To protect a name, either register the trademark or at least state in the README that the name and logo may not be used for commercial promotion.
If the four steps give you conflicting answers, do not panic. The most common conflict is wanting both maximum reach and changes flowing back. In that case, take a look at MPL-2.0: it only requires modified files to stay open, while new files you add can stay closed — a middle ground between permissive and copyleft. Or think about it the other way: publish under a permissive license first, and once the project has users and contributors, seriously consider whether to tighten it. A license choice can get clearer over time, but only if you write the four answers down first — on paper, in a note, anywhere except only in your head. Answers written down are answers you can decide on.
4. Worked example: the fictional project “Recipe Box”
Here is a full walkthrough with a fictional project. The people, the project, and the numbers are all invented, purely to show the decision process. Say you are Lin (a fictional person) and you vibe-coded a recipe organizer called “Recipe Box”: type in the ingredients left in your fridge, and it plans a week of meals and exports a shopping list. It is a web app, front end and back end in one repository, written entirely by you, with no copyleft-licensed dependencies.
Step 1, what do you want? You say: you want as many people as possible to use it, and you would love help making the recipe algorithm better, but you are not trying to make money from it and you do not mind others using it commercially. Goal set: reach first, improvements flowing back would be nice.
Step 2, can someone go closed-source and make money? You think about it and feel a bit uneasy about someone selling it without sharing changes back — but it is not a deal-breaker. What you care about more is getting improvements back. So you lean copyleft, but not strongly.
Step 3, how is it used? “Recipe Box” is a web app. The most likely thing someone does is deploy it as their own service, or lift the recipe algorithm into another food app. GPL-3.0 cannot cover the “deploy as a service” case, so you narrow it down to AGPL-3.0.
Step 4, patents and trademarks? The recipe recommendation algorithm is your own work — not exactly a core patent, but you would like some protection. And you want to keep the name “Recipe Box” for yourself. AGPL-3.0 includes a patent grant, so that box is ticked; the trademark part needs a separate note in the README, because the license itself cannot help there.
Four steps done, the answer is AGPL-3.0. Now change one assumption: if “Recipe Box” were only a locally run command-line tool and you did not care about closed-source commercial use, the answer would flip straight to Apache-2.0. Same person, same project — only the answers to “how is it used” and “do I mind closed-source profit” changed, and the license is completely different. That is why you cannot copy someone else’s answer: yours has to grow out of your own four answers.
5. Six traps that catch people most
Picking the right license is only the start. These traps can take months to undo.
Trap 1: Thinking you can switch licenses any time. Switching is not a one-line edit. A version already released stays under its license; to relicense a new version you need every copyright holder to agree. If you wrote everything yourself, switching is easy. The moment you accept outside contributions, every contributor is a partial copyright holder and they all have to say yes. The right move: decide before you publish, and if you are unsure, start permissive. Before accepting external contributions, set up a Contributor License Agreement (CLA) or a Developer Certificate of Origin (DCO) stating that contributions are licensed under the project’s license.
Trap 2: Copying code without checking its license. If your project uses a GPL-3.0 library, your distributed project has to be GPL-3.0 too — that is copyleft’s “viral” effect. AI coding makes this easy to trip over: the model may generate code that borrows from a GPL project. Build two habits: first, check the dependency list for copyleft licenses; second, ask where a key piece of AI-generated code came from. Your dependencies set the limits of your choice, not the other way around.
Trap 3: Assuming the license covers training data. A license covers code, not data. Whether someone may train a model on your code, and who owns the recipe data users upload, are questions the license itself does not answer. The usual approach is a separate data-use note, or an additional term outside the license stating “code in this repository is licensed under X; data is covered separately.” Do not hide data rules inside a license — it was not designed for that.
Trap 4: Thinking dual licensing is simple. Dual licensing means offering the same code under two licenses — say, GPL-3.0 for the community edition and a paid commercial license for businesses. It sounds great, but it has two prerequisites: first, you must own all the copyright or have every contributor’s agreement; second, someone has to manage the commercial terms, pricing, and support. For a solo developer, dual licensing makes sense only once the project already has users and someone is actually willing to pay for a commercial edition. Do not add that burden at the starting line.
Trap 5: Marketing BSL 1.1 as open source. If you use BSL 1.1, do not write “open source project” at the top of your README. The source is visible and it does convert to open source later, but production use is restricted until then. Writing “source-available license, converts to Apache-2.0 on such-and-such date” is more honest — and it avoids far more misunderstandings. Communities notice this kind of wording, and vague claims cost trust.
Trap 6: Dropping a LICENSE file in the root and calling it done. Putting the file in the right place is only step one. People — and machines — still need to see it at a glance. State the license name at the top of the README with one line explaining it; add an SPDX identifier at the top of each source file, for example one comment line naming the license; and if you can, check GitHub’s built-in license detection, which recognizes your LICENSE file and shows a license badge on the repository page. These are small things, but they are exactly what people look at when judging whether a project is serious.
6. Three things to do once you have decided
Once the license is chosen, spend half an hour on three things and you will not have to think about it again. First, put a complete LICENSE file in the repository root, copied word for word from the official license text — do not edit the wording or delete paragraphs, because a modified license text may not hold up. Second, state the license name at the top of the README, for example “This project is licensed under Apache-2.0,” plus one line on why you chose it — that line is for future contributors, and for future you. Third, go through your dependencies: list every third-party library’s license, confirm none of them conflicts with the one you picked, and write that list into the README or a separate document.
Do those three and the license question is settled. The next time someone asks “what license is this project under,” you will not need to dig through documents — just send them the line at the top of your README. One more easy habit: every time you cut a new release, glance at the LICENSE file and make sure it is still there and nobody deleted it by accident. Without a license file, the repository falls back to “no license,” and nobody has a basis to use your code at all — a silly mistake that one quick check can prevent.
One last reminder: this guide explains how to choose a license and avoid common mistakes. It is not legal advice. License texts are legal documents, and when a company, funding, a patent dispute, or a large commercial deal is involved, paying a lawyer to look it over is always cheaper than fixing things afterward. Even the best-chosen license only sets the rules for your project; what keeps a project alive is people using it, improving it, and choosing to stay. Get the license sorted, then build the thing, ship it, and let time and the community do the rest.
Comments (0)
Related articles
You already call functions every day; this guide names what you have been doing. Following MDN's Functions, Arrow function expressions, and Rest parameters: declarations versus expressions, parameters and arguments, default values, rest parameters, spread syntax, return values, arrow function shorthand, the this trap, callbacks, and scope.
One page should stand up on a phone, a tablet, and a computer. This guide follows MDN's Responsive web design, Using media queries, and the viewport meta reference: fluid HTML, the viewport tag, fluid grids and max-width, images that never burst their container, media query syntax, breakpoints set by content, mobile first, responsive type, testing capability instead of width, and a pre-launch checklist.
Numbers in JavaScript are one type, Number, stored as 64-bit floats — which is why 0.1 + 0.2 is 0.30000000000000004. This guide follows MDN's Basic math in JavaScript, Math, and Number: one number type, float error, counting money in cents, converting strings, NaN and Infinity, safe integers, the four rounding methods, Math.random, the Math toolbox, and formatting for display.