cloc
« Back to VersTracker
Description:
Statistics utility to count lines of code
Type: Formula  |  Latest Version: 2.06@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: code-analysis metrics developer-tools cli reporting
Install: brew install cloc
About:
cloc is a command-line utility that counts blank lines, comment lines, and physical lines of source code in many programming languages. It provides detailed reports on code distribution across files and languages, supporting a wide range of file formats. The tool is invaluable for understanding project complexity and tracking codebase evolution.
Key Features:
  • Supports over 200 programming languages and file formats
  • Generates detailed reports with code, comment, and blank line counts
  • Can count lines in compressed archives and multi-language projects
  • Provides multiple output formats including plain text, JSON, and CSV
Use Cases:
  • Estimating project scope and complexity for cost analysis
  • Comparing codebases before and after refactoring or migration
  • Auditing code for comment density and documentation standards
  • Generating software composition reports for compliance
Alternatives:
  • tokei – Rust-based, generally faster but with fewer language definitions
  • sloccount – Older tool, also estimates development cost but less maintained
License: GPL-2.0-or-later
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 13, 2025 3:57am 0 VERSION_BUMP 7d023d53