cloc Try It
Counts blank lines, comment lines, and physical lines of source code in many programming languages.
Version
Latest known: 2.08 (2026-01-25)
Latest known: 2.08 (2026-01-25)
Examples
3. Count the contents while ignoring some entries based on regex filter
cloc.exe . --not-match-f=".*\.github" --not-match-f=".*\.vscode"
4. Compute differences of physical lines of source code and comments between any pairwise combination of directory names, archive files or git commit hashes.
cloc.exe --diff d:\coldbox-platform-development.zip d:\www\myColdBoxWebFolder
Try it
- Count lines in the shared sample fixtures
Run cloc against TryIt/_samples/ with --json so each language is broken out per row: count of files, blank lines, comment lines, and code lines. The samples folder is intentionally mixed (Python, JavaScript, HTML, Markdown, SQL, JSON, XML, plain text) which makes it a compact way to see cloc's per-language breakdown. Adding --quiet suppresses the timing footer so the JSON document is self-contained. - Count lines in the cfExec CFC library (CFML support)
Run cloc against the project's CFCs/ directory to demonstrate cloc's first-class support for ColdFusion: 'ColdFusion' covers .cfm/.cfc tag-based files and 'ColdFusion CFScript' covers .cfc files that are predominantly cfscript. Both languages appear as separate rows in the JSON. The 'header' block has cloc's version and counted-files summary; the 'SUM' block is the project total.
Agree to terms to run demos.