cloc
brew install cloc
v2.08
GPL-2.0-or-later
Perl utility that counts lines of code, comments, and blanks across many programming languages.
Why you might care
Quick way to measure codebase size and composition across polyglot projects; supports archives, git commits, and 600+ language patterns out of the box. Useful for code audits, metric collection, and CI/CD integration. Lightweight Perl script with no external dependencies.
2.1k
30-day installs · #956
7.4k
90-day · #927
41.0k
365-day · #760
23.2k
★ GitHub stars · updated 28d ago
GitHub topics
cloc
count-lines
programming-language
Links
- https://github.com/AlDanial/cloc/
- GitHub: AlDanial/cloc
- Brew formula source: Formula/c/cloc.rb
Blurb generated by claude-haiku-4-5 on today.
Raw metadata
{
"aliases": [],
"alternatives": [
"sloccount",
"tokei",
"loc",
"wc"
],
"build_dependencies": [],
"categories": [
"text-processor",
"analytics"
],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Statistics utility to count lines of code",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:27+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "cloc",
"github_default_branch": "master",
"github_last_commit_at": "2026-05-23T17:39:13Z",
"github_readme_excerpt": "# cloc\n*Count Lines of Code*\n\n* * *\ncloc counts blank lines, comment lines, and physical lines of source code in many programming languages.\n\nLatest release: v2.08 (Jan. 24, 2026)\n\n[](https://github.com/AlDanial/cloc)\n[](https://github.com/AlDanial/cloc/graphs/contributors)\n[](https://doi.org/10.5281/zenodo.5760076)\n[](https://github.com/AlDanial/cloc/network/members)\n[]()\n\ncloc moved to GitHub in September 2015 after being hosted\nat http://cloc.sourceforge.net/ since August 2006.\n\n# Quick Start\n\n\n\nStep 1: Install cloc (see [Install from Github Releases](#install-from-github-releases)\nand [Install via package manager](#install-via-package-manager)) or run cloc\u0027s\n[docker image](#run-via-docker). The Windows executable has no requirements.\nThe source version of cloc requires a Perl interpreter, and the\nDocker version of cloc requires a Docker installation.\n\nStep 2: Open a terminal (`cmd.exe` on Windows).\n\nStep 3: Invoke cloc to count your source files, directories, archives,\nor git commits.\nThe executable name differs depending on whether you use the\ndevelopment source version (`cloc`), source for a\nreleased version (`cloc-2.08.pl`) or a Windows executable\n(`cloc-2.08.exe`).\n\nOn this page, `cloc` is the generic term\nused to refer to any of these.\n\n[Include Security](https://www.youtube.com/user/IncludeSecurity) has a\n[YouTube video](https://www.youtube.com/watch?v=eRLTkDMsCqs)\nshowing the steps in action.\n\n**a file**\n```\nprompt\u003e cloc hello.c\n 1 text file.\n 1 unique file.\n 0 files ignored.\n\nhttps://github.com/AlDanial/cloc v 1.65 T=0.04 s (28.3 files/s, 340.0 lines/s)\n------------------------------------------",
"github_repo": "AlDanial/cloc",
"github_stars": 23209,
"github_topics": [
"cloc",
"count-lines",
"programming-language"
],
"homepage": "https://github.com/AlDanial/cloc/",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 2092,
"installs_365d": 41041,
"installs_90d": 7414,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "GPL-2.0-or-later",
"llm_generated_at": "2026-06-20T23:48:05+00:00",
"llm_model": "claude-haiku-4-5",
"name": "cloc",
"oldnames": [],
"one_liner": "Perl utility that counts lines of code, comments, and blanks across many programming languages.",
"optional_dependencies": [],
"rank_30d": 956,
"rank_365d": 760,
"rank_90d": 927,
"raw_hash": "34fa974a5c890465",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/cloc.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [
"perl"
],
"version_head": "HEAD",
"version_stable": "2.08",
"versioned_formulae": [],
"why_use_this": "Quick way to measure codebase size and composition across polyglot projects; supports archives, git commits, and 600+ language patterns out of the box. Useful for code audits, metric collection, and CI/CD integration. Lightweight Perl script with no external dependencies."
}