
What it isCommand-line tool that measures cognitive and cyclomatic complexity of every function in 20+ languages with one command.
Why it grewAndré Staltz posted about using it to stop AI from writing junk tests: 33K views.
What to takeWraps an old metric into one command plus one threshold, so it can go straight into AGENTS.md.

| Similar product | How it differs from this one |
|---|---|
| SonarQube / SonarJSThe inventor of cognitive complexity, an enterprise platform | Need the whole suite or an ESLint plugin; cccc's own benchmark is 117x faster |
| lizardVeteran multi-language complexity tool, about 2,600 stars | Only computes cyclomatic complexity, no cognitive complexity |
| complexipyCognitive complexity tool, about 920 stars | Python only; cccc runs a mixed-language directory in one pass |
| sccLines-of-code counter, about 8,900 stars | Counts keywords per file, doesn't parse syntax, no function-level scores |
Can it hold?Can't be defended: the algorithm is public and parsers are off the shelf. All that's left is first-mover word of mouth and the name in the rule.
moznion commits the first line of code, creates the public repo the next day ↗
The author talks about "cccccc" at an in-person event in Tokyo; an attendee forks it on the spot and adds Python ↗
v1.0.0: per-language binaries merged into a single cccc, with a config file ↗
5 releases in two weeks; community contributions take languages from 4 to nearly 20 ↗
v1.8.0 adds C# and VB.NET; 484 stars on Oct 28 ↗
Staltz first mentions it: setting rules for AI, cccc cap of 42 ↗
Japanese engineer yuuk1 posts: installed on 15 repos, 33 likes, +11 stars the next day ↗

Staltz posts about using cccc to stop AI writing junk tests: 384 likes, 33K views ↗

+84 stars in one day to 606; at agent users' request, the author takes a PR adding Bash ↗

Download a roughly 5 MB archive, unpack a single binary, and run cccc --table --top-cognitive 8 src/ against a directory. It assigns each file to the right parser by extension and outputs two numbers per function: cognitive complexity (the SonarSource rules, where deeper nesting and more tangled logic score higher) and cyclomatic complexity (McCabe). We tried it on the zod source: 333 files, 8,640 functions, results in 36 ms, and the most complex function has a cognitive complexity of 193. Add --max-cognitive 15 and it exits non-zero whenever any function goes over, so CI can go red and an AI agent knows "this needs refactoring." Thresholds go in cccc.toml, and the official GitHub Action hooks in with one line.
Speed and multi-language support are the author's own selling points: the README says it's 117x faster than ESLint + SonarJS on zod (author's own test, Apple M4 Pro). But speed isn't what took it mainstream. André Staltz (author of Cycle.js, 6,000+ followers on GitHub) was making a different point in his post: AI loves piling tests onto functions that are obvious at a glance, so he added a line to AGENTS.md, "don't write tests for functions with cccc cognitive complexity ≤ 5, except those containing regex," and added in a reply, "refactor if cccc > 40." Someone in the replies put it more bluntly: "The clever part is turning a judgment call into a number. The agent doesn't have to decide what counts as trivial, it just measures." The next day someone filed an issue asking for Bash support, with the reason, in their words: "We have our AI agent measure complexity with cccc before writing tests." In Japan it started earlier: on Nov 9 engineer yuuk1 said he'd installed it on about 15 repos, "convenient."
There was pushback under the same post: the most-liked reply was "complexity doesn't decide whether something needs a test," and several people pointed out that permission checks and boundary validation need tests no matter how simple they are. The rule is contested, but the argument itself is helping it spread.
The 84 stars came from one post with 33K views, about one star per 400 views, a very small absolute number; after the jump it's still only 606 stars. Over the previous 174 days it grew slowly, mostly among Japanese engineers, and had 484 stars on Oct 28. A better sign that people really use it is another number: the binaries on GitHub Releases have been downloaded about 147,000 times, 96% of them the Linux build. That's basically one pull per CI run, so it counts runs, not users; a rough search on GitHub finds about 47 workflows using its Action. The command-line package on crates.io has only about 2,300 downloads.
There's no money. MIT license, no paid tier, not even a sponsor link in the repo (in October a user called on X for him to open GitHub Sponsors). The author is an engineer with a day job, and this is a side tool. The algorithm comes from a public paper and the parsers are all off the shelf, so anyone who wants to copy it could do it in a few weeks. Don't treat "build another complexity tool" as a business.
What's worth taking is the playbook: now that AI writes code, many old code metrics (complexity, duplication, dependency depth) suddenly have a new use as guardrails for agents. Make an old metric into a single binary, JSON output by default, non-zero exit when over the limit, add a rule that can be pasted straight into AGENTS.md, and distribution is handed to everyone who copies that rule. To make money you'd have to build on top: cross-repo trend dashboards, team threshold management, automatic PR comments. Those are the places people would pay.
