# cgag/loc

Count lines of code quickly.

Repository: https://github.com/cgag/loc
Canonical: https://ross.abutalabs.com/products/loc
Language: Rust
License: MIT
License Family: permissive
Last push: 2024-04-21T20:06:03+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3711, "days_push": 864, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2457, forks 125 (observed 2026-08-28T04:06:53.287671+00:00)

## What it is
loc is a fast Rust-based command-line tool for counting lines of code, serving as a much faster alternative to cloc. It reports files, lines, blank lines, comments, and code per language.

## Use cases
- count lines of code in a repository
- measure codebase size by language
- fast sloc statistics for large directories
- compare comment vs code line counts
- cloc alternative that is much faster

## When to choose
- you need very fast line counting on huge codebases
- you want a simple cloc-style report from the terminal

## When to avoid
- you need the most accurate language detection - tokei or scc are recommended by the author
- you need actively developed features - the project sees little maintenance

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: developer-tools, cli
- domain: developer-tools
- platform: windows, rust, cli
- tags: code-counting, sloc, cloc-alternative, statistics, command-line, linux, macos

## Member repositories
- cgag/loc (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:53.287671+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-30T02:30:01.734102+00:00, confidence not recorded.
  - readme: https://github.com/cgag/loc (fetched 2026-08-28T04:06:53.287671+00:00, sha 83f729c876dc)
  - registry_crates: https://crates.io/api/v1/crates/loc (fetched 2026-08-29T10:11:08.746367+00:00, sha 627dd7e4a5fa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
