# PostHog/posthog SLOC report

> PostHog/posthog: 9,122,294 code lines at commit b66c33a2c71b, counted with tokei-15.0.0 on 2026-11-16. Saved result 394bc19570fa3f4ff57da7206f0a2a1b3099f14d9c2d73f2eac17dae37ee77b3.

PostHog/posthog has 9,122,294 source lines of code out of 10,767,614 total lines across 54,792 files, counted with tokei from the master ref at commit b66c33a2c71b on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving PostHog/posthog to commit b66c33a2c71b, 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.

## Counting rules and retention

PostHog/posthog: 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.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 84.7% of all lines, comments represent 6.3%, and the repository averages 166 code lines per file. Python accounts for 36.1% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Python | 22,186 | 3,934,137 | 3,295,801 | 198,813 | 439,523 |
| TypeScript | 13,431 | 2,861,495 | 2,376,975 | 236,590 | 247,930 |
| TSX | 11,981 | 1,764,894 | 1,583,779 | 52,517 | 128,598 |
| JSON | 1,276 | 616,943 | 616,916 | 0 | 27 |
| Rust | 1,623 | 638,472 | 549,047 | 28,893 | 60,532 |
| YAML | 359 | 243,635 | 226,911 | 1,589 | 15,135 |
| HCL | 167 | 211,105 | 206,656 | 686 | 3,763 |
| SQL | 224 | 62,275 | 60,928 | 1,022 | 325 |
| JavaScript | 194 | 45,570 | 40,071 | 3,120 | 2,379 |
| Go | 160 | 39,871 | 34,022 | 1,726 | 4,123 |
| Sass | 310 | 40,821 | 32,721 | 1,863 | 6,237 |
| CSS | 80 | 24,086 | 20,453 | 1,689 | 1,944 |
| C++ | 11 | 23,829 | 19,598 | 462 | 3,769 |
| XML | 69 | 14,865 | 13,831 | 435 | 599 |
| SVG | 846 | 6,699 | 6,413 | 17 | 269 |
| BASH | 91 | 8,708 | 6,104 | 1,551 | 1,053 |
| TOML | 108 | 7,324 | 5,937 | 763 | 624 |
| HTML | 148 | 5,025 | 4,952 | 40 | 33 |
| Shell | 93 | 6,537 | 4,592 | 1,229 | 716 |
| Swift | 22 | 4,689 | 4,100 | 157 | 432 |
| C Header | 8 | 5,481 | 3,932 | 65 | 1,484 |
| Jinja2 | 73 | 4,358 | 3,278 | 6 | 1,074 |
| Kotlin | 21 | 3,290 | 2,887 | 112 | 291 |
| Protocol Buffers | 15 | 2,425 | 1,227 | 910 | 288 |
| Dockerfile | 8 | 992 | 499 | 352 | 141 |
| Pan | 8 | 288 | 244 | 31 | 13 |
| Makefile | 3 | 194 | 131 | 21 | 42 |
| Lua | 2 | 141 | 97 | 25 | 19 |
| CMake | 1 | 117 | 78 | 22 | 17 |
| Templ | 1 | 48 | 44 | 0 | 4 |
| INI | 5 | 62 | 37 | 23 | 2 |
| Ruby | 1 | 40 | 33 | 3 | 4 |
| MDX | 13 | 844 | 0 | 563 | 281 |
| Markdown | 1,125 | 165,661 | 0 | 124,470 | 41,191 |
| Plain Text | 129 | 22,693 | 0 | 22,322 | 371 |

Top language: Python 36.1%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/PostHog/posthog/commit/b66c33a2c71b0c1620b609654ead38af70df94d4?reportId=394bc19570fa3f4ff57da7206f0a2a1b3099f14d9c2d73f2eac17dae37ee77b3&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/PostHog/posthog/commit/b66c33a2c71b0c1620b609654ead38af70df94d4?reportId=394bc19570fa3f4ff57da7206f0a2a1b3099f14d9c2d73f2eac17dae37ee77b3&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does PostHog/posthog have?

PostHog/posthog has 9,122,294 lines of code, plus 682,087 comment lines and 963,233 blank lines, for 10,767,614 total lines at commit b66c33a2c71b on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the PostHog/posthog line count measured?

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

### What commit was counted for PostHog/posthog?

This OctoCounts report was generated from master at commit b66c33a2c71b on November 16, 2026.

## Similar repository reports

- [BasedHardware/omi](https://octocounts.com/github/BasedHardware/omi) — Python, 3,300,781 code lines
- [pytorch/pytorch](https://octocounts.com/github/pytorch/pytorch) — Python, 2,669,947 code lines
- [NousResearch/hermes-agent](https://octocounts.com/github/NousResearch/hermes-agent) — Python, 2,171,779 code lines
- [BerriAI/litellm](https://octocounts.com/github/BerriAI/litellm) — Python, 2,074,295 code lines
- [sgl-project/sglang](https://octocounts.com/github/sgl-project/sglang) — Python, 1,903,202 code lines
- [home-assistant/core](https://octocounts.com/github/home-assistant/core) — Python, 1,725,223 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
- [All OctoCounts guides](https://octocounts.com/docs)
