This article spotlights alternative tools to cloc.

The software featured here is free and open source. All tools provide a command-line interface (CLI) unless otherwise stated.
| Alternatives to cloc | |
|---|---|
| Tokei | Displays statistics about your code |
| scc | Fast accurate code counter with complexity calculations and COCOMO estimates |
| SLOCCount | Set of tools for counting physical Source Lines of Code |
| gocloc | A compact fast cloc tool seeking inspiration from Tokei |
| loccount | Re-implementation of David A. Wheeler’s sloccount tool in Go |
| loc | Rust implementation of cloc, but it’s more than 100x faster |
| tcount | Count your code by tokens and patterns in the syntax tree |
| sloc | Simple tool to count source lines of code written in CoffeeScript |
| polyglot | Command-line tool that determines project contents |
| enry | Programming language detector based on go-enry |
| Linguist | Assess a repository’s languages stats with github-linguist executable |
| CLOCTUI | TUI for CLOC |
Have we missed any open source alternatives to cloc? Please let us know!
All the CLI tools in this series.
| Alternatives to CLI tools |
|---|
| age // awk // bc // cal // cat // cd // chmod // cksum // cloc // cmp // compress // cp // cron // curl // cut // date // dd // df // diff // dig // du // fdisk // file // find // free // ftp // grep // gzip // hexdump // history // jq // kill // less // locate // ls // lsof // make // man // more // mv / ping // ps // psql // rename // rm // sed // split // ssh // stow // strings // sudo // sysctl // tail // talk // tar // telnet // time // top // touch // traceroute // tree // uname // uniq // uptime // vi // watch // Wget // who // whois // xargs |
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |


I suggest adding gocloc, it’s written in Go.
I see what they did there…
Thanks, gocloc is now included!
I’m using loccount, it’s a reimplementation of sloccount.
Cheers Penny, loccount has been added. This tool is written by the notable Eric. S Raymond, an American software developer, open-source software advocate, and author of the 1997 essay and 1999 book The Cathedral and the Bazaar.
We’ve also added loc too.
Eric. S Raymond is an open source legend!
He’s one of my heroes!
It’s interesting how some of these projects claim they are the fastest with examples to back up their assertion, even though they make contradictory claims.
You missed out tcount. Step up guys!
tcount is now included!
There’s the CoffeeScript sloc tool, and polygot which is written in ATS.
Keep up the good work!
Thanks, we’ve added both of them, together with a couple more!