Skip to content
boyter

boyter/scc

A tool similar to cloc, sloccount and tokei. For counting the lines of code, blank lines, comment lines, and physical lines of source code in many programming l

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go

8.6k 256 since joining 339GoPush 1d agoListed 3mo ago30 open issuesMIT
clicloccodecomplexitygolanglinuxmacosscc
  • Go86.8%
  • Shell5.1%
  • PowerShell3.5%
  • Python2.5%
  • HTML1.6%
  • Go Template0.4%
  • Dockerfile0.1%
View on GitHub

Report a problem

2 Reviews

114634550211463455021mo ago
TypeScriptPythonShell

scc starts with a clear promise—fast source-code counting—but adds useful analysis such as complexity estimates, COCOMO and LOCOMO models, unique-line and DRYness measures, multiple output formats, reports, and an MCP mode. The pure Go implementation, short command name, broad package availability, cross-platform binaries, and MIT license make it easy to adopt in local workflows, CI pipelines, repository inventories, and agent tooling.

The project would benefit from a concise guide explaining when its metrics become misleading, especially for generated code, vendored dependencies, notebooks, minified assets, and monorepos. Versioned benchmark datasets and machine-readable performance results would also make speed claims easier to reproduce. CI examples should caution teams against turning line count into an individual productivity target. scc is an excellent fit for developers, researchers, engineering-enablement teams, and tool builders who need fast repository statistics, provided they treat those measurements as contextual signals rather than judgments about software quality or contributor performance.

This is a highly capable CLI with a polished default path and unusually broad output/integration support. It feels mature, fast, and thoughtfully built. The core promise is strong: one small CLI gives readable line counts, complexity, cost estimates, many language detectors, CI-friendly output, and structured formats. The default output is immediately useful, and the --ci, --format json, --format csv, --by-file, and --format-multi paths all worked cleanly in my simulation.

What Works Well

  • Installation coverage is excellent: Go, Snap, Homebrew, Fedora, MacPorts, Scoop, Chocolatey, WinGet, FreeBSD, Docker.
  • The release zip including README.md and LICENSE is a nice offline-user detail.
  • First run is satisfying: scc <dir> gives a polished table plus totals and COCOMO estimates without extra setup.
  • Structured output is practical. JSON and CSV worked cleanly, and --format-multi tabular:stdout,json:file.json is especially useful for humans plus automation.
  • --ci switching from Unicode table borders to ASCII is a smart detail for logs.

Potential Improvements:
Kinda nitpicking here... but README states v3.5 while current is v3.7
The README has a small wording issue near Enterprise: “will always be a free and tool” likely meant “free tool.”