Command-line tool
cloc
brew/cloc
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Statistics utility to count lines of code programming-language cloc count-lines
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id AlDanial.Cloc -e scoop install cloc
macOS
brew install cloc
Linux
brew install cloc
Count all the lines of code in a directory
cloc path/to/directory
Compare 2 directory structures and count the differences between them
cloc --diff path/to/directory1 path/to/directory2
Ignore files that are ignored by VCS, such as files specified in `.gitignore`
cloc --vcs git path/to/directory
Browse
Related command-line tools
- scc
Fast and accurate code counter with complexity and COCOMO estimates cli code golang cloc complexity sloc sloccount… - tokei
Program that allows you to count code, quickly rust linux macos windows cli code cloc sloc statistics tokei… - sloc
Simple tool to count source lines of code developer-tools cli csharp cloc static-analysis sloc dotnet-tool… - gawk
GNU awk utility - crystal
Fast and statically typed, compiled language with Ruby-like syntax programming 编程 programming-language language 编程语言 语言 - onefetch
Command-line Git information tool rust tool cli git command-line command-line-interface - exercism
Command-line tool to interact with exercism.io development cli code learning exercism - reviewdog
Automated code review tool integrated with any code analysis tools regardless of programming language.
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents