DEV Community

Cover image for I built a site that estimates what your repos could be worth to AI companies
Pietro
Pietro

Posted on

I built a site that estimates what your repos could be worth to AI companies

I keep an eye on companies that train AI models. I spent the past year or so creating the best AI training / data annotation job aggregator out there, and the natural next step was to expand to enterprise data licensing.

Data labs are also interested in licensing private code, and some publish what they pay per token: one rate for source code and a lower rate for Git history. That gave me enough to build a calculator. Then the calculator turned into two sites.

Githubworth.com estimates what the repos on a GitHub profile might sell for based on real rates from active buyers. It's a spin-off utility tool from Dataconto, which helps companies license their operational data and coding bundles to data labs. It shows which AI companies buy code or company records, such as email, chat, tickets and docs, and what they ask for.

Both sites use the same pricing package and run on Cloudflare’s free tier

How the price is calculated

A repo’s estimated value is:

source tokens × $100 / 1M + history tokens × $40 / 1M

Those are published per-token rates for non-exclusive licenses. The methodology page links to the sources and notes when each rate was last checked.

The counter follows the published rules buyers use:

Code files count in full.
Docs, config and data count up to 10 times the size of the code.
Vendored folders, bundles and minified files are skipped.
Tokens are estimated as bytes divided by 4.
The counter runs in your browser, so folders you drop into it stay on your machine.

Estimating Git history
GitHub shows a repo’s languages and commit count, but not how many tokens are in its history. To estimate that, I cloned 532 public repos across 18 languages, counted their full histories using the same counter, and fitted this formula:

`history ≈ 45 × source^0.48 × commits^0.88

Findings

History grows almost one for one with commits, and roughly with the square root of source size. That fits how Git stores changes: each commit records new copies of the files it touched.
Once source size and commits were included, repo age, contributor count and repo size didn’t improve the estimate.
For the median repo, history made up 80% of the estimated value.
The estimate can be off by about 1.8x, so the site shows a range. The low end is 0.27 times the estimated history, and the high end is 3.8 times. That range covered the counted value for 77% of the repos.

Repos with 10 commits or fewer are the toughest to estimate. For those, the site shows only the range.

I also tested five trending repos that weren’t in the sample. ComfyUI came out at $7,448 estimated, compared with $7,112 counted. All five results fell within their ranges.

Limitations
The estimate relies on a small number of published rates. Most companies review each codebase and set a price individually, without publishing a rate. They aren’t included in the formula.

There are two other important limits:

Buyers review code before paying, so this is a list-price estimate, not an offer.

Nobody licenses public repos. For a public profile, the number shows what that much code and history might list for if it were private.

Top comments (0)