FEATURE

Bytes tell you weight. This tells you volume.

A 40 MB repo could be forty megabytes of actual source code, or it could be one enormous PNG and a README. RepoKit's lines-of-code estimate sits right next to the size badge on every file and folder, so you can tell the two apart in the same glance instead of guessing.

github.com/facebook/react
GitHub repo listing showing file size and estimated line counts side by side

The question size alone can't answer

"How big is this repository" is really two different questions wearing one trench coat. There's disk weight — how many megabytes you'll pull down — and there's code volume — how much actual logic you're signing up to read, review, or maintain. A repository full of pre-rendered documentation images or a checked-in vendor/ directory can be enormous in bytes while containing very little written code. Conversely, a lean, dependency-free utility library can weigh almost nothing while still representing thousands of carefully written lines.

RepoKit's lines-of-code estimate exists specifically to separate those two signals. It runs as a companion figure to the byte-size badge, appearing on the same rows, so a quick scan of a repo's root listing tells you not just "this folder is 12 MB" but "this folder is 12 MB across roughly 8,400 lines" — two numbers that, read together, say something neither says alone.

How the estimate is produced

RepoKit reads file contents through GitHub's API and counts newlines efficiently across the tree, layering the result in as a second pass after the initial size annotation (which only needs lightweight tree metadata and therefore appears first). Binary and non-text files — images, fonts, compiled bundles, lockfile blobs — are correctly excluded from the count rather than reported with a misleading line number, since a "line count" for a PNG isn't a meaningful concept.

The result is a genuinely useful estimate, not a precision code-metrics tool. It's the same category of signal as running wc -l across a checkout — a fast, honest approximation of scale, not a claim about code quality, complexity, or test coverage.

Where this becomes genuinely useful

  • Evaluating a new dependency — before adding a package to your project, a quick LoC glance tells you whether you're pulling in a focused 600-line utility or a sprawling 80,000-line framework, which changes how much due diligence is worth doing.
  • Sizing up an unfamiliar codebase — when you're about to contribute to or review a repo you've never opened before, LoC-per-folder gives you a mental map of where the "real" code lives versus where the scaffolding, docs, or generated assets sit.
  • Spotting generated or vendored code — a folder with an outsized byte count but a suspiciously low or nonsensical line count is often a sign of binary assets or minified bundles rather than hand-written source.
Worth knowing

This estimate deliberately trades perfect precision for speed and repo-wide coverage — the goal is an at-a-glance figure for every row in a large tree, not a slow, exhaustive audit of one file. For a line-by-line reading of a specific file's actual content, opening the file in GitHub's normal view (which now also shows line numbers) remains the right tool.

Frequently asked questions

Is the line count exact, down to the last line?+
It's a fast estimate rather than a byte-for-byte line parse of every file — RepoKit samples file contents efficiently to keep the whole repo tree annotated quickly, even on repositories with tens of thousands of files. For binary files (images, fonts, compiled assets) it correctly reports no meaningful line count rather than a misleading number.
Does it distinguish code from comments or blank lines?+
No — this is a raw line count, similar to what wc -l would give you across a tree, not a cyclomatic-complexity or code-quality metric. It's meant to answer 'how much text is actually in this file or folder,' which is usually the question people actually have when sizing up an unfamiliar repo.
Why does the estimate sometimes update after the page has already loaded?+
Line counting requires reading file contents, not just tree metadata, so RepoKit fetches sizes first (fast) and layers in line estimates as a second pass that streams in shortly after — you'll see the LoC figure populate a moment after the size badge appears rather than blocking the whole page on it.
Keep exploring

Related features & guides

See the real scale of any repo before you dive in.

RepoKit adds line-count estimates next to file sizes across every GitHub repository you visit. Free, instant, zero setup.

Add RepoKit to Chrome — it's free
Free · No account required · Works instantly on github.com