التراخيص هي قواعد المشاركة. ليست مخيفة — بل قوتك الخارقة! تعلّم أيّها تختار، وما الذي تسمح به، ولماذا تهمّ.
Think of it as the rules that come with sharing your creation.
Imagine you bake an amazing cake and want to share the recipe. A license is like a little note you attach that says what others can do with it:
«لن أشارك الوصفة. يمكنك فقط أكل الكعكة التي أعطيك إياها.»
«إليك الوصفة! افعل ما تشاء، فقط اذكر أنني أعددتها.»
«إليك الوصفة! إذا عدّلتها، يجب أن تشارك نسختك أيضًا!»
«إليك الوصفة! استخدمها بحرية، وأعدك ألا أقاضيك.»
Without a license, your code is ليس مفتوح المصدر — even if it's on GitHub! By default, copyright law means "all rights reserved." A license is what officially gives people permission to use, modify, and share your work. No license = no one can legally use your code.
These 5 licenses cover 95% of all open-source projects.
In plain English: «افعل بشيفرتي ما تشاء. أبقِ اسمي عليها فحسب. ولست مسؤولًا إذا تعطل شيء.»
The MIT License is the simplest and most permissive open-source license. It's just 170 words long! It lets anyone use, copy, modify, merge, publish, distribute, and even sell your code — as long as they include your original copyright notice.
React (Meta), VS Code (Microsoft), jQuery, Ruby on Rails, Node.js, Bootstrap, Electron, and thousands more. It's the #1 most popular license on GitHub!
In plain English: «استخدم شيفرتي بحرية. لكن إذا عدّلتها وشاركتها، يجب أن تشارك شيفرتك أيضًا بموجب GPL. لا يجوز لأحد جعلها مغلقة المصدر.»
Created by Richard Stallman, the GPL is the "copyleft" license. Its key rule: if you use GPL code in your project and distribute it, your entire project must also be GPL. This ensures the code stays free forever — no company can take it, close it, and sell it.
نواة Linux وWordPress وGIMP وBlender وGCC وBash وكثير من مشاريع البرمجيات الحرة الأساسية. إذا كان جزءًا من مشروع GNU، فترخيصه GPL!
⚠️ The "viral" effect: If you use GPL code in your app, your WHOLE app must become GPL. This is why some companies avoid GPL — they don't want to open their code. But this is exactly what GPL was designed to do: keep software free forever.
In plain English: «استخدم شيفرتي بحرية، حتى في المنتجات التجارية. وأعدك أيضًا ألا أقاضيك بشأن أي براءة اختراع في هذه الشيفرة. وإذا عدّلها أحد، فعليه توضيح ما غيّره.»
Apache 2.0 is similar to MIT but adds two important things: patent protection (يمنحك المؤلف ترخيصًا لاستخدام أي براءات اختراع في الشيفرة) و change documentation (يجب أن توضّح الملفات المعدّلة أنها عُدّلت).
Android (Google)، وKubernetes، وTensorFlow، وSwift (Apple)، وApache HTTP Server، وKafka، وHadoop. تفضّله الشركات الكبرى بسبب بند براءات الاختراع!
In plain English: «افعل ما تشاء. احتفظ بإشعار حقوق النشر الخاص بي. ولا تستخدم اسمي للترويج لنسختك.» يشبه MIT كثيرًا، لكنه آتٍ من الوسط الأكاديمي (Berkeley).
BSD came from the University of California, Berkeley. The 2-clause version is almost identical to MIT. The 3-clause adds a "no endorsement" rule: you can't say "Berkeley approves this" unless they actually do.
FreeBSD, OpenBSD, NetBSD operating systems, Nginx, PostgreSQL (similar), and many university research projects. macOS and PlayStation OS are based on BSD!
In plain English: «Creative Commons للمحتوى غير البرمجي: الصور والموسيقى والفيديوهات والمستندات والمواد التعليمية. تختار القواعد باستخدام عناصر بسيطة!»
CC licenses use a mix-and-match system with 4 building blocks:
The most open CC license is CC0 (الملك العام — دون أي قيود إطلاقًا!) و CC BY (يكفي ذكر المصدر). تستخدم ويكيبيديا CC BY-SA.
Wikipedia (CC BY-SA), Khan Academy, Flickr photos, MIT OpenCourseWare, many YouTube creators, and this Alin Li course! CC is the standard for open educational resources.
See all licenses at a glance!
| Feature | MIT | GPL v3 | Apache 2.0 | BSD |
|---|---|---|---|---|
| Commercial use | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| التعديل والتوزيع | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Use in closed-source | ✅ Yes | ❌ No! | ✅ Yes | ✅ Yes |
| يجب مشاركة التغييرات | ❌ No | ⚠️ YES! | ❌ No | ❌ No |
| حماية براءات الاختراع | ❌ No | ✅ Yes | ✅ Yes | ❌ No |
| Keep copyright notice | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| تدوين التغييرات | ❌ No | ✅ Yes | ✅ Yes | ❌ No |
| Complexity | Simple | Complex | متوسط | Simple |
| الطول | ~170 words | ~5,600 words | ~4,200 words | ~200 words |
| Best for... | أقصى حرية | Keeping code free forever | Enterprise + patents | مشاريع أكاديمية |
Answer 3 questions and we'll recommend the perfect license!
It takes literally 2 minutes!
GitHub's tool makes it easy to pick the right license with a comparison.
In the root of your project, create a file named LICENSE أو LICENSE.md
Copy the full license text and replace [year] and [author] with your information.
GitHub will automatically detect your license and show a badge on your repo. On GitHub, you can even add a license when creating a new repo — just select it from the dropdown!
لنرَ إن كنت قد فهمت التراخيص!