HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
boyter
scc
Go2018–2026
boyter / scc

scc

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

13Distinct people
18Mentions
0Explicit recommenders
8.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

  • boyter/cs · linked in 2 of the same discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year18 dated mentions

Observed mentions: 2018-04-17 23:28:11 UTC to 2026-10-14 01:14:28 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC110
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC615
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC211
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC312

What Hacker News says

18 sources
Been working on https://searchcode.com/ again which I bought back, albeit as code search tool for LLMs. It solves the “should I use this library” by allowing the LLM to inspect search and analyse it before integration. Can use it to compare multiple repositories before downloading. It comes with a large amount of token savings and can be really useful when wanting to learn about a codebase. Since it does it anyway I added dossier pages to it as well https://searchcode.com/repo/github.com/rust-lang/rust Which is useful for humans, and shows what the system is creating. Best part is that I get to use the tools I have built, so https://github.com/boyter/scc and https://github.com/boyter/cs to improve it which benefits anyone using those tools.
In Ask HN: What are you working on? (May 2026)
boyter·Feb 22, 2026Submission

Show HN: CS – indexless code search that understands code, comments and strings

I initially built cs (codespelunker) as a way to answer the question, can BM25 relevance search work without building an index? Turns out it can, and so I iterated on the idea, building it into a full CLI tool. Recently I wanted to improve it by adding relevance of tools like Sourcegraph or Zoekt but again without adding an index. cs uses scc https://github.com/boyter/scc to understand the structure of the file on the fly. As such it can filter searches to code, comments or strings. It also applies a weighted BM25 algorithm where matches in actual code rank higher than matches in comments (by default). I also added a complexity gravity weight using the cyclomatic complexity output from scc as it scans. So if you're searching for a function, the implementation should rank higher than the interface. cs "authenticate" --gravity=brain
Read the rest
# Find the complex implementation, not the interface cs "FIXME OR TODO OR HACK" --only-comments # Search only in comments, not code or strings cs "error" --only-strings # Find where error messages are defined cs "handleRequest" --only-usages # Find every call site, skip the definition v3.0.0 adds a new ranker, along with a interactive TUI, HTTP mode, and MCP support for use with LLMs (Claude Code/Cursor). Since it's doing analysis and complexity math on the fly, it's slower than any grep. However, on an M1 Mac, it can scan and rank the entire 40M+ line Linux kernel in ~6 seconds. Live demo (running over its own source code in HTTP mode): https://codespelunker.boyter.org/ GitHub: https://github.com/boyter/cs
15 points · Open discussion
More lines of code usually indicates more bugs so its not an entirely useless metric. Using it to gauge employee productivity is, since as the linked suggests some of the better programmers are able to remove code, which often reduces the potential for bugs. I personally find some use it in, if nothing else to identify which files probably need to be refactored as they are too large, or complex. Throw in some cyclomatic complexity and you are getting some useful information out the code counts. Counting lines of code is one metric though. Another I have seen thrown around is ULOC https://cmcenroe.me/2018/12/14/uloc.html where you count the number of unique lines of code, sort -u *.h *.c | wc -l Again another metric that potentially speaks to the health of a project. I personally wrote about this some time ago when someone asked why I
Read the rest
wrote a code counting project https://boyter.org/posts/why-count-lines-of-code/ and I liked the idea of ULOC so much I integrated it into the project as well. Clearly I am not alone in this though, hence there being so many code counters around (forgive me if I missed yours in the following list) and discussion around it. - [SLOCCount](https://www.dwheeler.com/sloccount/) the original sloc counter - [cloc](https://github.com/AlDanial/cloc), inspired by SLOCCount; implemented in Perl for portability - [gocloc](https://github.com/hhatto/gocloc) a sloc counter in Go inspired by tokei - [loc](https://github.com/cgag/loc) rust implementation similar to tokei but often faster - [loccount](https://gitlab.com/esr/loccount) Go implementation written and maintained by ESR - [ployglot](https://github.com/vmchale/polyglot) ATS sloc counter - [tokei](https://github.com/XAMPPRocky/tokei) fast, accurate and written in rust - [sloc](https://github.com/flosse/sloc) coffeescript code counter - [scc](https://github.com/boyter/scc) my own counter Incidentally the articles author confused me for a while using standard unix tools to count code, as I had them confused for David Wheeler who wrote the very first code counter that I know of sloccount.
In Counting Lines of Code
Going to say my own https://github.com/boyter/scc/ which I have used to turn down projects of "Oh we just need to do X" It allows me to evaluate the code-base quickly and see where potential issues are, and find hidden complexity in the code. I have said no a lot due to it. The only reason it exists was because I got caught out from another project, which wasted months of my time. Otherwise IntelliJ and the JetBrains IDE's in general.
In Ask HN: Programs that saved you 100 hours? (2022 edition)
Very cool to see this here, Ben! It was fun hearing the ins and outs of your work on this in the TZ discord, and the final result is fast. Also, off-topic but as you know, I recently tried out your scc tool and am eagerly awaiting its support for Elixir templates (.eex, .heex)! You said it was a day from done a while back and would go out in the next release. What’s the release schedule like? https://github.com/boyter/scc
In Building a custom code search index in Go

Showing the 15 most recent of 18 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.