Counts blank lines, comment lines, and physical lines of source code in many programming languages.
- v2.12
- Published at
- 12h ago
- 23,669
- Stars
- 534,439
- Download
- Synced at
- 11m ago
Latest release
v2.12Nov 13, 2026, 05:14 AMDownloads slow? Switch the source anytime above
README
Project Overview
cloc (Count Lines of Code) counts blank lines, comment lines, and physical lines of source code in many programming languages.
Key Features
- Count source code lines (blank, comment, code)
- Supports many programming languages
- Supports files, directories, archives, and git commits
- Windows executable available
- Docker support
Target Audience
- Developers and project managers needing code statistics
- Open-source project maintainers
- Technical evaluation and audit professionals
Quick Start
- Install via package manager or download from Releases
- Count a single file:
cloc hello.c - Count a directory:
cloc gcc-5.2.0/gcc/c - Count an archive:
cloc master.zip - Count a git commit:
cloc 6be804e07a5db
Core Advantages
- Supports a large number of programming languages
- Multiple input sources (files, directories, archives, git)
- Cross-platform (Windows, Linux, macOS)
- Open-source, free, and continuously maintained
System Requirements
- OS: Cross-platform (Windows, macOS, Linux)
- Architectures: x86_64, arm64
- Additional Dependencies: Perl (source version) or Docker (Docker version)
Notes
- Windows executable has no additional dependencies
- Latest version: v2.10 (July 4, 2026)
Release history
Sort