scc
Command-line code counter that reports lines, blanks, comments and code per language, with complexity, ULOC and COCOMO cost estimates.
Tested on Linux
Use it
Linux x86_64
You need first
- Runtimes:
go>=1.25 (for go install)
These steps ran from a folder named work in the home folder, which already existed. Make it and run them from there:
mkdir -p "$HOME/work" && cd "$HOME/work"Download the scc_Linux_x86_64 release tarball and install the binary to ~/.local/bin
mkdir -p ~/.local/bin /tmp/scc && curl -fsSL https://github.com/boyter/scc/releases/latest/download/scc_Linux_x86_64.tar.gz -o /tmp/scc/scc.tar.gz && tar xzf /tmp/scc/scc.tar.gz -C /tmp/scc && install -m755 /tmp/scc/scc ~/.local/bin/scc
Verified in pickfit: the commands exactly as its sandbox ran them
For the record only: they name the sandbox's home, /home/sbx.
mkdir -p ~/.local/bin /tmp/scc && curl -fsSL https://github.com/boyter/scc/releases/latest/download/scc_Linux_x86_64.tar.gz -o /tmp/scc/scc.tar.gz && tar xzf /tmp/scc/scc.tar.gz -C /tmp/scc && install -m755 /tmp/scc/scc ~/.local/bin/sccscc --versionmkdir -p /home/sbx/work/sample && cat > /home/sbx/work/sample/main.py <<'EOF'
# a comment
import sys
def f(x):
if x > 1:
return 1
for i in range(3):
print(i)
return 0
EOF
cat > /home/sbx/work/sample/dup.py <<'EOF'
# a comment
import sys
def g():
return 0
EOFcd /home/sbx/work/sample && sccCheck that it works
scc --versionThe output should contain “scc version 4.1.0”.
First thing to try
mkdir -p "$HOME"/work/sample && cat > "$HOME"/work/sample/main.py <<'EOF'
# a comment
import sys
def f(x):
if x > 1:
return 1
for i in range(3):
print(i)
return 0
EOF
cat > "$HOME"/work/sample/dup.py <<'EOF'
# a comment
import sys
def g():
return 0
EOFcd "$HOME"/work/sample && sccChange into a project folder and run scc to see line counts per language.
What it does
- Count code, comment and blank linesTested
How to use it
- Change into your project folder and run
sccto see lines, blanks, comments and code per language. - Run
scc --by-fileto see the counts for each file.
- Change into your project folder and run
- Estimate code complexityTested
How to use it
- Run
sccin your project folder and read the Complexity column. - Run
scc --by-fileto see complexity for each file.
- Run
- Get COCOMO and LOCOMO cost estimatesTested
How to use it
- Run
scc --cost-comparisonin your project folder to see the cost estimates, including the LOCOMO LLM estimate.
- Run
- Count unique lines of code (ULOC)Tested
How to use it
- Run
scc -uin your project folder and read the Unique Lines of Code (ULOC) line.
- Run
How far pickfit got
Linux x86_64
- Installs
- Starts
- 4 of 4 features work
- Works offline
Windows and macOS: the project says it runs there; pickfit hasn’t tried it.
Good for
- count lines of code per language in a directory
- estimate development cost of a codebase with COCOMO
- export code statistics as CSV or JSON for further processing
- generate an HTML infographic report of a repository
An alternative to cloc, SLOCCount and tokei.
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
Its main function works
- Replayed from scratch
- Works offline
- Checked on 15 Nov 2026
- Version 4.1.0
Differences the test machine hit
- README: go install github.com/boyter/scc/v4@latest (or sudo snap / dnf / pkg)
In the test: No Go toolchain and no root in the box, so the README's 'Manual' release binary was used: https://github.com/boyter/scc/releases/latest/download/scc_Linux_x86_64.tar.gz - README: Release binary install
In the test: The prebuilt binary was not inspected (it is opaque)