← Back to tools
View AGENTS.md for cloc
cloc
Count blank lines, comment lines, and source code lines in many languages
Description
cloc is a tool for counting blank lines, comment lines, and physical lines of source code in many programming languages. It understands the syntax of a wide range of programming languages and provides detailed statistics.
AI Summary
A tool for counting lines of code, comments, and blank lines across many programming languages.
Capabilities
- + Count lines of code in 600+ languages
- + Differentiate between code, comments, and blanks
- + Diff mode to compare code changes
- + Multiple output formats (text, JSON, YAML, SQL)
Use When
- → You need to count lines of code in a project
- → You want codebase statistics
Avoid When
- x You need code complexity analysis (use scc instead)
- x You need real-time monitoring