scc
$ scc Community Low Riskscc (Sloc, Cloc and Code) measures lines of code, comments, blanks, and estimated cyclomatic complexity across repositories while honoring .gitignore. Its --format json and --by-file flags help agents pinpoint complex hotspot files quickly.
brew install scc Single-binary local scc --format json gives instant complexity and LOC metrics without an MCP service.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --format json (plus csv, html, cloc-yaml), deterministic sorting (-s), and non-interactive stdout.
- Native
--format jsonand--by-filereporting
Purely read-only local analyzer with zero network traffic and automatic .gitignore handling.
- Read-only Go binary; no credentials or external requests
Single static Go binary available on brew, go install, choco, snap, and releases.
- Zero-dependency binary across macOS, Linux, and Windows
Adds per-language and per-file complexity heuristics beyond raw line counts.
- Fast parallel counting plus complexity estimates
Actively maintained by Ben Boyter with strong performance benchmarks.
- Regular releases under
boyter/scc
Clear README and --help covering formats, exclusions, and complexity scoring.
- Comprehensive README and CLI help flags
Security, Auth & Guardrails
None required; operates purely on local readable files.
100% free, offline, and open-source (MIT / Unlicense).
# scc Agent Rules - Pass `--format json` (and `--no-cocomo` unless cost estimates are requested) for clean structured metrics. - Avoid `--by-file` without filtering on large monorepos to keep stdout bounded.
Agent-Ready Command Recipes
Safe Read-Only Queries
scc --format json --no-cocomo .
Outputs language totals with complexity scores while omitting project cost estimates.
scc --by-file -s complexity --format json src/
Breaks down LOC and complexity per file to highlight refactoring targets.
Strengths for Agents
- + Combines fast LOC counting with cyclomatic complexity hotspots in
--format json. - + Respects
.gitignoreautomatically and distributes as a single Go binary.
Caveats & Pitfalls
- ! COCOMO cost estimates are heuristic and noisy—pass
--no-cocomowhen agents only need code metrics.