Your old repositories are an asset. Almost nobody treats them like one.
Private code you own can be licensed to AI labs for model training. Non-exclusively, so you keep it. Here is what qualifies, what does not, and what actually happens.
Why anyone would pay for your old code
Coding models are trained on code. The public supply has been collected already, and it is skewed: libraries, frameworks, tutorials, and the sorts of projects people choose to publish. It under-represents the thing most software actually is, which is line-of-business systems maintained for years by people who inherited them.
That kind of code was never published, so it was never scraped. It is scarce, and scarcity is the whole argument. Nothing here depends on your code being impressive.
What qualifies
┌─ ELIGIBLE ──────────────────────────────────────────────────────────┐ │ Private repo, you hold the IP │ │ Commit history intact and unsquashed │ │ Real production code, however ugly │ │ Dependencies excluded from the count │ │ No secrets, no customer data │ └─────────────────────────────────────────────────────────────────────┘ ┌─ NOT ELIGIBLE ──────────────────────────────────────────────────────┐ │ Public repos, already scraped │ │ Client owns the IP under your contract │ │ Credentials or personal data in the tree or in history │ │ node_modules, vendor/, Pods/ and friends │ └─────────────────────────────────────────────────────────────────────┘
┌─ WORTH CHECKING ─────────────────────────────────────────────────────┐ │ │ │ Private, finished, owned by you, and doing nothing. │ │ │ │ [ See what your repos are worth ] │ │ │ └──────────────────────────────────────────────────────────────────────┘
How it works, step by step
-
Work out what you own
Personal projects and anything built for yourself is straightforward. Client work depends on the contract. If an agreement assigned all intellectual property to the client, that code is not yours to license, regardless of who typed it.
-
Find the private repositories
Public code is already in training data and holds no licensing value. You are looking for private repositories: finished client projects, internal tools, products that did not launch, long-lived side projects.
-
Submit them as they are
No clean-up needed. Dependency folders, generated files and third-party code do not count towards anything and are excluded from the valuation. Secrets and personal data are stripped from the review copy for you, code and history both, and verified before a buyer sees anything. Your own repository is never modified.
-
Get it assessed
Volume, language, history depth and originality all affect what a body of code is worth. That assessment happens on the program side, not here.
-
Get paid, repeatedly
The licence is non-exclusive. Nothing is transferred, nothing is published, and you carry on using your own code exactly as before. Because it is non-exclusive, the same repository can be licensed again to another buyer, and you are paid each time rather than once.
What you keep
Everything. The word "sell" is doing damage here, so be precise about it: this is a non-exclusive license. You retain copyright. You retain the right to use, modify, publish, and sell your own code. You retain the right to license the same code to somebody else.
Nothing is published. Your code does not appear anywhere. The grant is permission to train on it, which is a much smaller thing than developers assume when they first hear the pitch.
The awkward question about client work
Most working developers have far more client code than personal code, and that is exactly the code with the least clear ownership.
It comes down to what you signed. A work made for hire clause or a full assignment of intellectual property means the client owns it outright. A plain services agreement with no IP language often leaves more with you than people expect. A license-back clause can leave you with usable rights even after assignment.
Read the contract before you offer anything. If you cannot find the contract, that is an answer too.
Start with who owns the code you wrote for a client and work for hire versus license.
The part that is worth more than your source
Almost everyone assumes the value is in the finished code. It is not. It is in the git history.
A snapshot of your final source shows a model what good code looks like. Your commit history shows it how code gets that way: the failed approach that got reverted, the bug that took four attempts, the refactor that touched thirty files, the workaround with an apologetic message attached. That is the signal that teaches a model to maintain software rather than just generate it, and it cannot be manufactured.
In practice history runs to roughly twenty times the token volume of the source itself, so even at a lower rate per token it is where most of the money ends up. The practical instruction is short: do not tidy it. Do not squash, do not rewrite, do not start a clean repository to make things look presentable. That deletes the majority of the value.
If you run an agency
Agencies are sitting on the largest version of this. Years of delivered projects, internal tooling, R&D that never shipped, and the accumulated history of a team that has been working together for a decade. It is the single biggest idle asset most agencies own and it does not appear on any balance sheet.
The ownership question is sharper for you, not softer. Client-owned work, anything under NDA, and anything with confidential data stays out of it entirely. What is left is usually still substantial: your own products, internal tools, R&D, and engagements that wound down with rights retained.
Common questions
- Do I lose ownership of my code?
- No. These are non-exclusive licenses. You keep the copyright, keep using the code, keep shipping it, and can license the same code again to someone else.
- Does my code have to be good?
- No. Training value comes from realism, not elegance. Workarounds, dead ends, and awkward legacy code are useful precisely because they are what real software looks like.
- What about client work?
- It depends entirely on what your contract assigned. Work made for hire and full assignment clauses mean the client owns it and you cannot license it. A license-back or a plain services agreement with no IP transfer often means you retain rights. Check before you offer anything.
- What about secrets in the repository?
- Secrets and personal data are stripped from the copy pulled for review, in both the code and the history, and that is verified before any buyer sees it. Your own repository is not touched. You do not need to clean anything up first.
- Does it cost anything?
- No. There is no fee to join and nothing is taken out of your share. Access is read-only and you choose which repositories are ever touched.
- How often do I get paid?
- Every time a licence closes on that code, not once. Because the licences are non-exclusive, the same repository can be licensed again to a different buyer, and you are paid again each time. How often depends on demand.
- How long does it take?
- An initial estimate is immediate. Preparing and grading a codebase takes anywhere from a few hours to about four weeks depending on size. It is then presented to buyers in batches, which typically runs two to sixteen weeks, and licensing depends on demand rather than being guaranteed. Payment follows within fifteen days of the buyer paying.
Find out whether your repositories qualify.
The eligibility check is short and costs nothing.
You keep your code either way.