cloc

Count lines of code, comments, and blank lines in source files

brewmacoslinux
Try with needOr install directly
Source

About

Statistics utility to count lines of code

Commands

cloc

Examples

Count lines of code in a single file$ cloc myfile.py
Count lines of code in a directory recursively$ cloc /path/to/project
Count lines of code by language and show summary$ cloc --by-file-by-lang /path/to/project