explaingit

busches/cloc

Analysis updated 2026-07-18 · repo last pushed 2016-06-09

PerlAudience · developerComplexity · 1/5DormantSetup · easy

TLDR

A simple, dependency-free tool that counts lines of code, blanks, and comments across dozens of languages in a file, folder, or archive, with no setup required.

Mindmap

mindmap
  root((cloc))
    Inputs
      Source files
      Folders
      Archives
    Outputs
      Line counts
      CSV or XML report
    Use Cases
      Estimate project size
      Track codebase growth
      Compare code versions
    Tech Stack
      Perl
    Audience
      Developers
      Project managers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Estimate the size and complexity of a codebase you just inherited or are evaluating.

USE CASE 2

Track how much code was added or changed across releases of your own project.

USE CASE 3

Compare two versions of a codebase to see exactly how much code changed.

USE CASE 4

Export line-count metrics as CSV, XML, or YAML to feed into other reporting tools.

What is it built with?

Perl

How does it compare?

busches/clocrelequestual/dancerrelequestual/moose
LanguagePerlPerlPerl
Last pushed2016-06-092016-02-012015-08-28
MaintenanceDormantDormantDormant
Setup difficultyeasyeasymoderate
Complexity1/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Single Perl script with no external dependencies beyond Perl itself, which ships on most Unix-like systems.

License is not stated in the available content.

Copy-paste prompts

Prompt 1
Show me the command to run cloc on my project folder and explain the breakdown of code, blanks, and comments it gives me.
Prompt 2
Walk me through using cloc to compare two versions of a codebase and see what changed.
Prompt 3
Help me export cloc's output as CSV so I can chart lines of code by language over time.
Prompt 4
Explain how cloc distinguishes comments from code across different programming languages.

Frequently asked questions

What is cloc?

A simple, dependency-free tool that counts lines of code, blanks, and comments across dozens of languages in a file, folder, or archive, with no setup required.

What language is cloc written in?

Mainly Perl. The stack also includes Perl.

Is cloc actively maintained?

Dormant — no commits in 2+ years (last push 2016-06-09).

What license does cloc use?

License is not stated in the available content.

How hard is cloc to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is cloc for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.