[email protected]:~$ man cloc

← cd ..
cloc logo★ 23.3K

cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.

cloc demo

DESCRIPTION

cloc ("Count Lines of Code") is a command-line utility written in Perl that counts blank lines, comment lines, and physical lines of source code across hundreds of programming languages.

Key features include:

  • Broad Support: It recognizes and parses code stats for a vast array of languages, handling differences in single-line and multi-line comment styles automatically.

  • Flexible Inputs: It can analyze individual source files, entire directories, specific git commits/repositories, and compressed archive formats (like .zip, .tar.gz, .deb, .rpm, or .whl files).

  • Code Differences: It can compare two versions of a codebase to compute the delta in blank lines, comments, and actual code.

  • Portability: Written in pure Perl with minimal external dependencies, it runs across Linux, macOS, BSD variants, and Windows (where standalone compiled .exe binaries are also available).

INSTALLATION

$ brew install cloc

DETAILS

Repository
AlDanial/cloc (2026-07-17)
Author
AlDanial
License
GPL-2.0
Category
Data Processing
Language
Perl
Platforms
Linux, macOS, Windows
Version
v2.10 (2026-07-04)
Repo Age
10 years old

TAGS

MORE IN DATA PROCESSING