To sell a software license, you grant a buyer written permission to use your code on set terms, and you keep ownership. The license says what the buyer may do, for how long, where, whether anyone else can get the same rights, and what they pay. Selling outright is different: an assignment transfers ownership for good. If you want to keep your code and be paid more than once, grant a non-exclusive license. Today the buyers paying for licenses to idle code at scale are AI labs, which license real source code and git history to train coding models.
What does it mean to license software?
A license is permission. Copyright in your code gives you the exclusive right to copy it, change it and distribute it. A license lets someone else do some of those things under conditions you agree on. Ownership stays with you.
Most people meet software licenses as users: an end user license for an app, a subscription for a SaaS, an open source license on a library. Licensing your own source code is the same idea from the other side. You decide who gets a copy, what they can do with it and what they pay.
Should I license my code or sell it outright?
Selling outright, known as an assignment, ends your relationship with the code. Licensing keeps it. The table sets out the trade.
| License | Sell outright (assignment) | |
|---|---|---|
| Who owns the code after | You | The buyer |
| Can you keep using it | Yes, unless the license is exclusive and says otherwise | Only if the buyer licenses it back |
| Can you be paid again | Yes, with a non-exclusive license | No, it is a one-time sale |
| What buyers usually expect | Clear rights and a defined scope | Revenue, users and a clean handover |
| Paperwork | A license agreement | An assignment, usually with due diligence |
Acquisition marketplaces want revenue and users, because the buyer is taking over a business. A license has no such bar. The buyer only needs the rights it asks for, so code with no customers can still be worth licensing.
Exclusive or non-exclusive: which license should I grant?
An exclusive license promises the buyer that nobody else will get the same rights. Sometimes that includes you. Exclusive deals can pay more up front, but they close the door on every other buyer for the scope they cover, and they often restrict your own use.
A non-exclusive license lets you grant the same rights to as many buyers as you like and keep using the code yourself. Each buyer pays for their own license. For code that has stopped earning on its own, non-exclusive is usually the better trade, because the same repo can earn again.
Is a software license perpetual or for a set term?
Either. A perpetual license has no end date, though it can still end for breach. A term license runs for a fixed period, such as a year, and may renew. Subscription software is a term license; a one-time purchase is often perpetual.
For training data, ask how the license treats models already trained on your copy, since training cannot easily be undone. A good agreement answers this plainly.
What does a source code license typically cover?
A source code license is a contract, and the main terms are much the same from deal to deal:
- Grant and scope. What the buyer may do: copy, modify, use internally, train models, distribute.
- Exclusivity. Exclusive or non-exclusive, and for what field or territory.
- Term and termination. How long it lasts and how either side can end it.
- Payment. A flat fee, a royalty, or a rate per unit. Training licenses are often priced per token.
- Ownership. A plain statement that you keep ownership of the code and its copyright.
- Your promises. Usually that you hold the rights to what you license and that it contains no third-party code or personal data you cannot share.
- Confidentiality and security. How the copy is stored and who may see it.
- Limits of liability. What each side owes if something goes wrong.
The promise about rights matters most for you. You can only license code you hold the rights to. Code written for a client or an employer usually belongs to them. If you are unsure, read who owns the code first.
How do I license my code to AI labs?
AI labs need large amounts of real, private code with real history to train and evaluate coding models. They buy through licensing programs that collect code from many owners, check it and take it to labs in batches. Here is how it works, step by step.
- Check your rights. Pick repos you own outright: your products, internal tools, side projects, shelved startups.
- Request access. Fill in the form to get a valuation. You are set up and sent everything you need.
- Read and sign. Read the agreement in full, then sign once. The license is non-exclusive and you keep ownership.
- Connect read-only. Give read-only access to GitHub, GitLab or Bitbucket and select only the repos you want to license. Once Git is connected, you see a real per-repo estimate.
- Submit as is. No clean-up is needed. Secrets and personal data are stripped from a review copy, code and history both, before any buyer sees it. Your repository is untouched.
- Get paid, repeatedly. Code is graded on the review copy and taken to buyers in batches. Each time a license closes and the buyer pays, you are paid within 15 days.
There is no listing and no upfront cost. You can withdraw a codebase; check in the agreement what that means for licenses that have already closed. For the process in more detail, read how to sell source code, and for why labs pay at all, read sell code for AI training.
How much does a source code license pay?
Training licenses are priced per token. Source code pays $100 per million tokens and git history pays $40 per million. History usually carries most of the value, so a repo with years of real commits earns far more than the same code in one squashed commit.
A typical repo earns about $1,000 to $1,500 per license. A light repo earns about $400 to $700 and a deep one about $2,500 to $4,000. Because the license is non-exclusive, the same repo can be licensed more than once and you are paid each time. How often depends on buyer demand. For the full working, read how much is my code worth.
What kinds of software can I license?
Most private codebases you own. Web apps, mobile apps, back-end services, desktop software, games and internal tools all qualify, in any mainstream language, as long as the code has never been public and was written by people. Commercial success makes no difference. The bigger and more complete the system, the better. If the codebase is a finished or shelved product, the page on how to sell software source code covers that case.
What stays out: code you do not own, anything public now or in the past, AI-written code, WordPress sites, themes and plugins, customer data, and third-party code. Open source dependencies keep their own licenses and are excluded from what is licensed. Your own code and its history are what count.
What should I check before I sign a license agreement?
- The license is non-exclusive, and you keep ownership.
- You keep full internal and commercial use of the code.
- Access is read-only and limited to the repos you select.
- Rates are published, and changes need notice and never apply retroactively.
- Payment timing is stated in writing.
- There is no fee to join and no commitment.
If an agreement asks for exclusive rights, write access or a fee to list, ask why. None of those are needed to license code for training.