Sell your source code to AI companies for training coding models

Short answer

A business can license a copy of its private source code, ideally with its commit history, tests, code reviews and linked issues, to AI companies training coding models and agents. Private code in less common languages, older systems and specialized domains is worth more, because it is scarce in public repositories. Secrets, credentials, customer data and third-party code must be removed first, and the business must actually own the code, which is not automatic for contractor-written or client work.

Updated Plain-text version

What this covers and where it lives

Source code includes your applications, internal tools, scripts, infrastructure configuration, database schemas and the tests that go with them. Most of it sits in GitHub or a similar hosted repository, with the surrounding history in issue trackers such as Jira and design documents in Confluence.

Software companies are the obvious holders, but code also accumulates at MSPs (automation and scripts), engineering firms (calculation tools and integrations) and any business that has built its own systems over the years.

What AI companies use source code for

  • Coding models that write and complete code, which need large amounts of real, working code beyond what is public.
  • Coding agents that fix bugs and implement features. They learn best from real tasks: an issue, the code change that resolved it and the tests that confirm it.
  • Code review tools, trained on pull requests and the comments reviewers made.
  • Modernization tools that translate or upgrade older code, which need examples of legacy languages and frameworks.
  • Evaluation sets, where private code the model has never seen tests whether it really works.

What makes a codebase more valuable

  • Full history. Commit history with meaningful messages, pull requests, review comments and linked issues, rather than a single snapshot.
  • Tests. Code with tests that run lets a buyer check whether a model's change actually works.
  • Scarce languages and domains. Legacy languages, embedded and industrial software, financial or healthcare business logic, and niche frameworks are less represented in public code.
  • Real production code that has been maintained for years, not prototypes.
  • Size and breadth, across many repositories and contributors.
  • Builds that work, so the code can be compiled and run in a buyer's environment.

What has to be removed first

  • Secrets and credentials: API keys, passwords, private keys, tokens and connection strings, in current files and throughout the commit history, where deleted secrets often still live. Any secret found should also be rotated, whether or not you sell.
  • Customer and personal data in test fixtures, seed databases, sample files, logs and comments.
  • Third-party code copied or vendored into your repositories, including open-source code under licenses that impose conditions. Your license to a buyer can only cover code you own.
  • Identifying details, such as your company and product names, internal hostnames, email addresses in commit metadata and developer names, so buyers can't tell whose code it is.
  • Security-sensitive material, such as code describing how your production systems are secured, which you may prefer to leave out.

Common questions

Will licensing our code let a model reproduce our product?

Models trained on large amounts of code learn patterns rather than copying a single product, and buyers never learn whose code it is. License terms can also address reproduction. Code that is central to your competitive position can be left out.

Is old code in outdated languages worth anything?

Often more than you'd expect, because modernization tools need legacy examples and little of that code is public.

Do we need to include our issue tracker?

It's not required, but issues linked to the commits that resolved them are among the most valuable things a codebase can include. See Jira.

General information, not legal advice. Pergola reviews each seller's contracts, policies and applicable law before anything is sold.

Valuation

What could your data be worth?

A rough range in under a minute. Your answers carry over to your request.

22 years
64
Systems you've used for years
Estimated payout
$100K – $250K
Buyer demand86%
Depth of history73%
System coverage19%
Get my free valuation

Indicative only. Final value depends on volume, quality and your rights to the data, which we confirm in a free valuation under NDA.

Get started

Find out what your records are worth.

A partner replies personally within two business days.

Mutual NDA before we talk specificsFree valuation, no obligationPaid only if you sell
Your estimate is attached automatically.