cloc is a command-line tool that counts blank lines, comment lines and source lines across many programming languages. It is aimed at developers and teams who want to measure the size of a code base or see how it changed between two versions.
Given two versions of a code base, it reports the differences in blank, comment and source lines. It is written in Perl and needs only the standard Perl distribution, version 5.6 or later, because some outside modules are bundled inside it. The source code is public and the project is released under the GPL-2.0 license.
Alternatives to cloc
Products that do a similar job in Developer Tools.
tokei
command-line tool that counts lines of code by language
fzf
Command-line fuzzy finder for lists of files, history and any text
lazygit
Terminal UI for running git commands with keyboard shortcuts
ripgrep
command-line search tool that finds regex matches across directory trees
Alacritty
GPU-accelerated terminal emulator for Linux, macOS, Windows and BSD
bat
command-line file viewer with syntax highlighting and git integration
GitHub CLI
Command line tool for working with GitHub from the terminal
Warp
Terminal application rebuilt as a development environment