devtools.cihat.dev

Open source license generator

Pick a license, type your name, and get the LICENSE file ready to commit, using the same texts GitHub offers when you create a repository.

License

GitHub API: 60 requests an hour per network without signing in.

How to use it

  1. Choose a license. The three columns show what it allows, what it requires and what it does not give.
  2. Type the copyright holder: your name, or your organisation’s. The year starts at this year.
  3. Download the file as LICENSE and commit it to the root of your repository. GitHub detects it and shows it in the About panel.

Which license to choose

Three questions settle it for most projects.

  • Do you want anyone to use it for anything, with credit? MIT. Short, permissive and very widely used.
  • Same, but with an explicit patent grant? Apache 2.0. Common for company-backed projects.
  • Do you want improvements to stay open? GPL 3.0 for applications, LGPL for libraries others link to, AGPL when people use your software over a network.
  • Do you want to give up all rights? The Unlicense or CC0 put the work as close to the public domain as the law allows.

Where the texts come from

Each license text is fetched from GitHub’s licenses API, the same source as the license picker on github.com, which uses the choosealicense.com texts. Only the [year] and [fullname] placeholders are filled in; the rest is unchanged, as it must be.

GPL and Apache texts end with instructions for adding a short notice to each source file. Those placeholders are part of the instructions, so they are left as they are.

Questions people ask

How do I add a license to my GitHub repository?

Download the file here, name it LICENSE, and commit it to the root of the repository. GitHub detects it within a few minutes and labels the repository with it.

What year should a license say?

The year the work was first published. Many projects write a range, such as 2021-2026, when they keep updating the code.

Can I change the license later?

You can license new versions differently, but copies already released under the old license keep it. With outside contributions you may need the contributors’ agreement.

Do I need a license for a public repository?

Yes, if you want others to use the code. Without one, ordinary copyright applies and nobody may legally copy or modify it.

Is the license text modified?

No. Only the year and name placeholders are filled in. Changing a license’s wording makes it a different, unrecognised license.