CommandCross-platform
Scribe's Tally
Count Lines of Code by Language
Analyzes a codebase and reports line counts broken down by programming language, excluding blank lines and comments. Useful for project metrics and documentation.
cloc --exclude-dir=node_modules,vendor,dist,.git .Usage Notes
- •Automatically detects languages by file extension
- •
--by-fileshows counts for each individual file - •
--jsonor--yamlfor machine-readable output - •
--diffcompares two codebases or commits - •Alternative:
tokeiis faster for large repositories - •Install:
brew install clocorapt install cloc
Warnings
None
Related Scroll Ideas
- • Compare line counts between git branches
- • Generate code statistics report as JSON
- • Exclude test files from count