What Is a License File?
What is a license file. LICENSE, LICENCE, or COPYING records what is allowed for reuse. What the file says, where it goes, and what no license means.
A license file describes what other people may do with a project's code, such as use it, change it, or share it. It is a plain-text file in the project's top folder, usually named LICENSE.
GitHub is a website for code sharing and collaboration, based on the Git version-control system. Most popular projects on GitHub allow code reuse. However, many code projects have restrictions. The license file explains what is allowed. The license is what gives permission, even if the code is publicly visible.
Which license suits your project, and what a license allows in your situation, are legal questions. An AI agent can read a license file and tell you whether you are allowed to copy and reuse code. The AI agent will usually tell you it is not qualified to give legal advice. And this article is not legal advice, so consult an attorney if money or court action is at stake.
Some commercial apps also use a "license file", often with a .lic extension, to unlock the app after you buy it. That is a different kind of file. This article doesn't cover it.
What's in a Project Folder? explains the other files you'll see beside a license file in a project. Knowing what each file in a project does is part of setting up a Mac. The roadmap shows the rest.
LICENSE, LICENCE, and COPYING
You'll find the license under one of three names, each with a .md extension, a .txt extension, or none:
LICENSE- the American spelling, as seen on GitHub.LICENCE- the British spelling.COPYING- the name the GNU project uses for its programs, withCOPYING.LESSERfor the GNU Lesser General Public License.
GitHub recognizes all three. When a project has more than one, GitHub's license detector prefers LICENSE with no extension, then LICENSE.md or LICENSE.txt, then COPYING.
What a license file says
The file holds the full text of one license, often with a copyright line that names the author.
You'll meet a few licenses often. Here's how choosealicense.com, a site GitHub runs, sums up two of them:
- MIT License - short and permissive. It lets people do almost anything with the code, including making closed-source versions.
- GNU GPLv3 - lets people do almost anything except distribute closed-source versions.
Each license also has a short identifier from the SPDX License List, such as MIT, Apache-2.0, or GPL-3.0-only. You'll see these identifiers in the license field of project files such as package.json and pyproject.toml.
No license file
A project with no license at all isn't free to use. GitHub and choosealicense.com both explain that without a license, default copyright applies. The author keeps all rights. Nobody else may copy, share, or change the code, even if it is public.
Code in a public GitHub repository can be viewed and copied to another GitHub account (forked) under GitHub's terms of service, but that doesn't give permission to use, change, or share it. If you find code you want to use with no license, choosealicense.com suggests asking the people who maintain it to add one.
License files on GitHub
GitHub reads the license file and shows the license's name on the project's front page. Most projects keep the license in the top folder. Some also name it in the README file.
To add a license to a project on GitHub, create a new file named LICENSE in GitHub's web editor. GitHub then shows a "Choose a license template" button, which fills in the text of the license you pick.
Some projects keep related files, such as contribution guidelines, in a hidden folder named .github. The .github folder explains what goes there. Show Hidden Files on Mac shows how to see it.
How to open a LICENSE file on Mac
The Finder lists a LICENSE file with no extension as kind "text". To read it, select it in the Finder and press Space. Quick Look shows the license as plain text.
License files and AI agents
You can ask Anthropic Claude or ChatGPT Codex to add a license file to your project, with the standard text of the license you name. The choice of license stays with you.
Continue setting up your Mac
Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.