macOS
brew install cloclocal Homebrew formula metadata
sudo port install clocMacPorts ports tree · textproc/cloc/Portfile · source: api.github.com
brew
Statistics utility to count lines of code. Version 2.10 via Homebrew; verified 2026-07-04.
install
brew install cloclocal Homebrew formula metadata
sudo port install clocMacPorts ports tree · textproc/cloc/Portfile · source: api.github.com
sudo apk add clocAlpine Linux edge package indexes · cloc · source: dl-cdn.alpinelinux.org
sudo apt install clocDebian stable package indexes · cloc · source: deb.debian.org
sudo dnf install clocFedora Rawhide package metadata · cloc · source: dl.fedoraproject.org
nix profile install nixpkgs#clocnixpkgs package indexes · pkgs/by-name/cl/cloc/package.nix · source: api.github.com
sudo pacman -S clocArch Linux sync databases · cloc · source: geo.mirror.pkgbuild.com
choco install CLOCChocolatey community package catalog · CLOC · source: community.chocolatey.org
scoop install main/clocScoop official bucket manifest trees · bucket/cloc.json · source: api.github.com
winget install --id AlDanial.Cloc -eWindows Package Manager source index · AlDanial.Cloc · source: cdn.winget.microsoft.com
overview
Statistics utility to count lines of code
history
cloc counts blank lines, comment lines, and physical source lines across many programming languages, with support for files, directories, archives, repositories, and diffs.
cloc was created by Al Danial and dates to 2006, when the project was hosted on SourceForge. The official README states that cloc moved to GitHub in September 2015 after SourceForge hosting that began in August 2006.
The tool is written in Perl, is designed to be portable with few external requirements, and incorporates ideas or code from SLOCCount, Regexp::Common, Win32::Autoglob, and Algorithm::Diff. Release notes show steady additions of language recognizers, output formats, archive support, VCS/diff features, and Windows packaging improvements.
cloc became a staple packaging target because it is useful in almost any source tree and easy to ship as a command-line utility. The official README documents installation through npm, apt, yum, dnf, pacman, emerge, apk, pkg, pkg_add, MacPorts, Homebrew, winget, Chocolatey, Scoop, Docker, and GitHub releases.
The batch input independently records coverage across Alpine, Homebrew, Chocolatey, Debian, Fedora, MacPorts, Nix, Arch, Scoop, Ubuntu, and Winget, matching cloc's broad cross-platform adoption.
Users run `cloc` on a file, directory, archive, git commit, or repository to get language-level blank/comment/code counts. It can also compare versions, read archives such as tar, zip, wheels, RPMs, and Debian packages, and emit reports in multiple formats.
Because the source version runs on Perl and the Windows executable bundles what it needs, cloc is practical for CI jobs, release audits, quick repository comparisons, and language-mix summaries.
cloc is package-nerd significant because it is one of the standard tiny tools people install everywhere to inspect source distributions. It also tests package metadata assumptions: source archives, generated Windows binaries, shell wrappers, Perl availability, Docker images, CPAN/npm wrappers, and OS-native packages all coexist.
Its README explicitly credits maintainers for Debian, CPAN, and npm packaging, showing that cloc's distribution story is not incidental but part of its ecosystem.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cloc | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/AlDanial/cloc
install metadata
| Package key | brew:cloc |
|---|---|
| Version | 2.10 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/cloc |
| Homepage | https://github.com/AlDanial/cloc/ |
| Repository | https://github.com/AlDanial/cloc |
| Upstream docs | https://github.com/AlDanial/cloc#readme |
| License | GPL-2.0-or-later |
| Source archive | https://github.com/AlDanial/cloc/archive/refs/tags/v2.10.tar.gz |
| Last updated | 2026-07-04T23:36:10Z |
| Pulse | updated |
| Uses from macOS | perl |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cloc |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
cloc 2.04-1
statistics utility to count lines of code
https://github.com/AlDanial/cloc
sudo apt install cloccloc
nix profile install nixpkgs#cloccloc 1.98-1
statistics utility to count lines of code
https://github.com/AlDanial/cloc
sudo apt install cloccloc 2.08-r0
Count lines of code
https://github.com/AlDanial/cloc
sudo apk add cloccloc-doc 2.08-r0
Count lines of code (documentation)
https://github.com/AlDanial/cloc
sudo apk add cloc-doccloc 2.08-1.fc45
Count lines of code
https://github.com/AlDanial/cloc
sudo dnf install cloccloc 2.08-1
Count lines of code
https://github.com/AlDanial/cloc
sudo pacman -S cloccloc
sudo port install clocCLOC
choco install CLOCmain/cloc
scoop install main/clocAlDanial.Cloc
winget install --id AlDanial.Cloc -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.