NetHack/NetHack

NetHack/NetHack has 395,442 source lines of code out of 552,398 total lines across 888 files, counted with tokei from the NetHack-5.0 ref at commit baf8e7186ff1 on November 8, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

As of 2026-11-08 (commit baf8e7186ff1), NetHack/NetHack contains 552,398 total lines: 395,442 code, 106,384 comments, 50,572 blank, across 888 files in 22 languages (top language: C 80.3%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.

As of 2026-11-08 (commit baf8e7186ff1), NetHack/NetHack contains 552,398 total lines: 395,442 code, 106,384 comments, 50,572 blank, across 888 files in 22 languages (top language: C 80.3%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving NetHack/NetHack to commit baf8e7186ff1, downloading the repository source archive, and counting files selected by the effective rules with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options; an exact reproduction needs the same commit, engine version, and effective counting rules.

Repository size insights

This is a large codebase by counted code lines. Code represents 71.6% of all lines, comments represent 19.3%, and the repository averages 445 code lines per file. C accounts for 80.3% of counted code.

LanguageFilesLinesCodeCommentsBlanks
C3454147213174825754839691
C Header252519103621199425757
Lua132175891413423221133
C++28188001402528261949
Visual Studio Project183055305500
R8246724071149
Perl2533642219691454
Makefile626141698444472
Python81273103570168
Shell121184786277121
MSBuild1055855152
Visual Studio Solution238137902

Top language: C 80.3%. Generated on .

Counting rules and retention

NetHack/NetHack: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

Reproduce this report

Reproduce this exact report and configuration.

Report FAQ

How many lines of code does NetHack/NetHack have?

NetHack/NetHack has 395,442 lines of code, plus 106,384 comment lines and 50,572 blank lines, for 552,398 total lines at commit baf8e7186ff1 on November 8, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

How was the NetHack/NetHack line count measured?

OctoCounts resolved the public GitHub repository to commit baf8e7186ff1, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

What commit was counted for NetHack/NetHack?

This OctoCounts report was generated from NetHack-5.0 at commit baf8e7186ff1 on November 8, 2026.

Similar repository reports

Other public repositories with an OctoCounts report, ranked by top language and code size similarity:

Play the growth animation for NetHack/NetHack on this page — 395,442 code lines across 22 languages, counted by tokei.