# AlDanial/cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.

Repository: https://github.com/AlDanial/cloc
Canonical: https://ross.abutalabs.com/products/cloc
Language: Perl
License: GPL-2.0
License Family: copyleft
Topics: cloc, count-lines, programming-language
Last push: 2026-08-08T13:26:32+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 67, longevity 100
- inputs: {"age_days": 4013, "days_push": 25, "days_rel": 60, "gap_med": 160, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 23466, forks 1121 (observed 2026-08-28T04:11:34.971543+00:00)

## What it is
cloc is a command-line tool that counts blank lines, comment lines, and physical lines of source code across many programming languages. It can analyze individual files, directories, archives, or git commits and reports per-language statistics.

## Use cases
- count lines of code in a project
- measure comment vs code ratio in a codebase
- compare code size between git commits
- get per-language line statistics for a directory
- audit codebase size before refactoring

## When to choose
- you need quick, language-aware line counts from the terminal
- you want a mature, dependency-light tool with broad language support
- you need to analyze archives or git diffs for code volume

## When to avoid
- you need deeper code quality metrics like complexity or duplication
- you want IDE-integrated live metrics rather than a CLI report

## Facets
- artifact type: cli-tool
- maturity: stable
- function: developer-tools, analytics, cli
- domain: developer-tools, programming-languages
- platform: cross-platform, cli, windows
- tags: count-lines-of-code, code-metrics, perl, sloc, command-line, linux, macos, docker

## Member repositories
- AlDanial/cloc (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:34.971543+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:27.772794+00:00, confidence not recorded.
  - readme: https://github.com/AlDanial/cloc (fetched 2026-08-28T04:11:34.971543+00:00, sha 2a3488f2be97)
- Data as of 2026-08-30T08:39:29.467469+00:00.
