Analysis updated 2026-06-21
Get a quick breakdown of a codebase by language when you join a new project
Estimate the size of a software system for project planning or effort estimation
Generate line-count metrics for a report on how large a product's codebase is
Count lines of code at a specific git commit to track growth over time
| aldanial/cloc | brendangregg/flamegraph | so-fancy/diff-so-fancy | |
|---|---|---|---|
| Stars | 22,970 | 19,473 | 18,017 |
| Language | Perl | Perl | Perl |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 3/5 | 1/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Perl on Linux and Mac, Windows users can download a standalone executable with no dependencies.
cloc (Count Lines of Code) is a command-line tool that counts how many lines of source code are in a project. It breaks down the count by programming language and separates actual code lines, comment lines, and blank lines, giving you a clearer picture than a simple total. The problem it solves is simple but useful: when you inherit a codebase, want to estimate its size for a project plan, or need to report on how large a software system is, manually counting is impractical. cloc scans a file, directory, zip archive, or even a specific git commit and produces a neat summary table showing file counts and line counts per language. You would use this when onboarding to an unfamiliar project and want to understand its scale and composition, when estimating effort for a rewrite, or when generating metrics for reporting. It supports hundreds of programming languages and can be run on Windows, macOS, and Linux. It requires a Perl interpreter when running the source version, but Windows users can use a standalone executable with no dependencies. cloc is written in Perl and is a single-file command-line program.
A command-line tool that scans any codebase and reports how many lines are code, comments, and blanks, broken down by programming language in a neat summary table.
Mainly Perl. The stack also includes Perl.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.