scc
Code counter written in Go that reports lines of code, comments, complexity, ULOC and COCOMO estimates across many languages, with multiple output formats.
scc (Sloc, Cloc and Code) is a code counting tool in the same space as cloc, sloccount and tokei. It counts lines of code, blank lines, comment lines and physical lines across many programming languages, and reports the number of bytes processed. It is written in Go and runs on Windows, Linux and macOS.
Beyond line counts, scc estimates code complexity in a manner similar to cyclomatic complexity calculators, calculates COCOMO cost estimates (tunable with flags such as --avg-wage and --cocomo-project-type, or disabled with --no-cocomo), and provides LOCOMO estimation for LLM-based development costs. It can also compute unique lines of code (ULOC) by file, language or project, and can ignore duplicate files, minified files, and large files by line count or bytes. It identifies many files by #! line, and handles details such as C# verbatim strings; blank lines inside comments are counted as comments.
Usage is scc [flags] [files or directories]. --by-file gives a per-file breakdown, --format outputs CSV, JSON, SQL, HTML and other formats (including cloc-style YAML), --count-as maps unrecognised extensions to a known language, and --report generates a self-contained HTML report. Configuration can come from a .sccconfig file, a global file via SCC_CONFIG_PATH, or CLI flags. The table of contents also lists git insight reports and an MCP server mode. It suits developers, teams and CI pipelines that need fast codebase size and complexity metrics.
Installation
# via Homebrew
brew install scc
# via Go
go install github.com/boyter/scc/v4@latest
# via Snap
sudo snap install scc
Alternatives & related tools
reviewdog
Parses linter output and posts findings in changed lines as review comments on GitHub, GitLab, and Bitbucket, or filters lint results by diff locally.
Terragrunt
Orchestration tool for OpenTofu/Terraform infrastructure code, used to scale and manage Infrastructure as Code across many modules and environments.
Krew
Package manager for kubectl plugins: discover, install, and manage plugins from a central index, similar to apt, dnf, or brew.
Popeye
Read-only scanner that lints live Kubernetes clusters for misconfigurations, unused resources, and over/under allocation, with console, JSON, and HTML reports.
Docker CLI
Source repository for the Docker command-line client, written in Go and built with docker buildx bake, with cross-platform and glibc/musl build targets.
add a badge to your README
Maintain scc? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/scc?utm_source=badge)<a href="https://www.trmn.sh/tools/scc?utm_source=badge"><img src="https://www.trmn.sh/badge/scc.svg" alt="Featured on trmn" height="20"></a>