Selling source code and repositories
Code with version history, reviews and bug tickets shows how software is actually built. AI labs use it to train coding agents. We check the rights, exclude third-party code and license your own repositories to vetted buyers.
At a glance
- Coding agents learn from code with version history, reviews and bug tickets.
- pre.dev pays US$100 per million code tokens; a small start-up received about US$25,000 for its code.
- Under German law, the economic rights to code written by employees in the course of their duties belong to the employer (§ 69b UrhG).
- Third-party code such as open-source libraries, SDKs and engines, as well as code owned by clients, is excluded.
Why do AI labs buy source code?
To train coding agents on real software development. Tasks such as debugging have a verifiable result.
Public code usually only shows the end result. Internal repositories, by contrast, show how software is built: commits, code reviews, bug tickets and the discussions around them. The market has grown accordingly: according to the wind-down service SimpleClosure, 47% of its deals now include a sale of code or data.[1]
What do buyers pay for code?
With volume pricing, a few thousand US dollars per repository; as part of a company dataset, considerably more.
pre.dev pays for code by tokens: US$100 per million code tokens and US$40 per million tokens of Git history, non-exclusively. A repository with 20 million code tokens and 100 million tokens of history therefore brings US$6,000.[2] A crypto start-up around two and a half years old received about US$25,000 for its code.[1] Together with tickets, documentation and team communication the value rises, because the whole development process can then be traced. Prices by company size are covered in What is company data worth?
Who owns the code?
Under German law, the economic rights to code written by employees in the course of their duties belong exclusively to the employer. For freelancers, agencies and commissioned development, the contract decides.
Under § 69b UrhG, where a computer program is created by an employee in the execution of their duties or following the employer's instructions, only the employer is entitled to exercise all economic rights, unless otherwise agreed.[3] For other constellations, we review the contracts before the licence.
| Origin | Rights | Consequence for the licence |
|---|---|---|
| Employees, in the course of their duties | With the employer (§ 69b UrhG) | Can be licensed |
| Freelancers and agencies | As per contract | Review the contract |
| Commissioned development for clients | Often with the client | Usually exclude |
| Open source, third-party SDKs and engines | Their own licence terms | Exclude |
What is removed before the handover?
Third-party code, credentials and personal references. What remains is the company's own code with a traceable history.
- Third-party code: open-source libraries, licensed SDKs and engines, and code belonging to clients.
- Credentials: keys, passwords and tokens that ended up in the repository by mistake.
- Personal references: names and email addresses in commits and tickets are replaced with consistent pseudonyms.
- Company references: product and company names, domains and internal addresses.
In opened German insolvency proceedings, the administrator decides on the realisation (§ 80 InsO).[4]
How does the sale work?
In four steps. No repositories leave the company until a buyer has been found.
- 1
Initial call and estimate
You answer nine questions on industry, software, data volume and history, or talk to us directly. We do not need access to the data for this and give you a first estimate.
- 2
Data sheet and buyer search
We describe the dataset without names, agree the data sheet with you and approach vetted buyers. Company and proceedings remain confidential.
- 3
Fee and anonymisation
As soon as a buyer has been found, we agree a success-based fee. Under a data processing agreement we anonymise the dataset locally at the seller; the buyer receives a sample under NDA.
- 4
Licence and handover
You approve the buyer, we hand over the anonymised data and then delete the mapping.
Frequently asked questions
May a company sell its source code?
Yes, to the extent it holds the rights. Under German law, the economic rights to code written by employees in the course of their duties belong exclusively to the employer (§ 69b UrhG). For freelancers, agencies and commissioned development, the contract decides.
What do buyers pay for code?
pre.dev pays US$100 per million code tokens and US$40 per million tokens of Git history, so US$6,000 for a repository with 20 million code tokens and 100 million tokens of history. As part of a company dataset with tickets and communication, more is possible.
What happens to open-source libraries in the repository?
They are excluded, as are licensed third-party SDKs and engines. Only code to which the company holds the rights is licensed.
Are credentials in the code removed?
Yes. Keys, passwords and credentials that ended up in the repository by mistake are searched for and removed before the handover. Names and email addresses in commits are pseudonymised.
Sources
- [1]MIT Technology Review (Matthew King): “AI labs are buying data from dead startups to train their models”, 13 October 2026
- [2]pre.dev: “Code licensing”, accessed 20 October 2026
- [3]Federal Ministry of Justice (Germany): “§ 69b UrhG, authors in employment and service relationships”
- [4]Federal Ministry of Justice (Germany): “§ 80 InsO, transfer of the right to manage and dispose”
This overview is no substitute for legal advice in the individual case. German statutes are cited in their original abbreviation.
What is your dataset worth?
Nine questions, no data needed, no upfront costs. You receive a first estimate.
Other data types
- Email archivesLicense company emails and team chats as training data, anonymised under the GDPR.
- Ticket dataLicense support histories with task, resolution and outcome as training data.
Related articles
- Market · 9 minSelling company data for AI training: who buys, what is in demand and how it worksAI labs train agents on real workflows. Who the buyers are, which data they look for and what they check before buying.Read
- Prices · 12 minWhat is company data worth? Prices, buyer programmes and deals in 2026Ten buyer programmes with published prices, documented deals and funding rounds: what internal company data are worth in 2026 and what drives the price.Read