Description:
Simple tool to count source lines of code
|
|
Type: Formula
|
Latest Version: 0.3.2@0
|
Tracked Since: Dec 24, 2025
|
|
Links:
Homepage |
GitHub |
formulae.brew.sh
|
|
Stars: 967 |
Forks: 81 |
Language: CoffeeScript |
Category: Developer tools
|
|
Tags:
sloc
loc
metrics
code-analysis
cli
|
|
Install:
brew install sloc
|
About:
sloc is a command-line utility that counts physical lines of source code across various programming languages. It provides a quick and straightforward way to assess project size and complexity without the overhead of more complex static analysis tools.
|
Key Features:
- Supports over 150 programming and markup languages
- Provides detailed breakdowns including physical lines, source lines, and comments
- Zero-dependency Node.js application for easy installation and fast execution
- Machine-readable output formats (JSON, CSV) for integration with other tools
|
Use Cases:
- Quickly estimating the scope and complexity of a new codebase
- Generating metrics for project documentation or reporting
- Comparing code density across different languages or project versions
|
Alternatives:
-
cloc
– cloc is written in Perl and is often pre-installed on systems, but sloc offers a lighter, Node.js-based alternative with similar functionality.
-
tokei
– tokei is significantly faster and written in Rust, making it better suited for extremely large codebases, whereas sloc is simpler and sufficient for standard projects.
|
| Detected |
Version |
Rev |
Change |
Commit |
| Dec 24, 2025 9:55pm |
0.3.2 |
0 |
VERSION_BUMP |
c1c97382 |
| Aug 24, 2024 11:44pm |
|
0 |
VERSION_BUMP |
d86b505d |
| Aug 1, 2024 2:16pm |
|
0 |
VERSION_BUMP |
1823c16d |
| Aug 1, 2024 2:16pm |
|
0 |
VERSION_BUMP |
b1e65196 |
| Feb 15, 2023 8:08am |
|
0 |
VERSION_BUMP |
444cd397 |
| Feb 15, 2023 4:16am |
|
0 |
VERSION_BUMP |
e6a580fb |
| Feb 15, 2023 2:30am |
|
0 |
VERSION_BUMP |
72a996fd |
|