Counting every line of code in my AI projects
I had Claude count the code in the 29 projects in my current projects folder. How much there is, which projects are biggest, and why the first count was three times too high.
I asked Claude to count all the code in my projects folder. It came to about 1.03 million lines across 29 projects, not counting blank lines, comments or tests.
The first count actually said 3.1 million. Two out of every three lines it found weren’t real work:
- Copies of this blog: 875,824 lines. My agents make a full copy of the site so they can work on a post without touching mine. Six were still on disk. Each one carries the games and decks the site hosts, and so does mine. The site’s own code is only about 10,500 lines.
- 941 test reports from one game: 768,489 lines. Its test tool saves a web page after every run. That’s almost ten times the size of the game itself.
- Other people’s code: 244,250 lines. Libraries and tools I’d copied in to build on.
- Backups and built files: 185,991 lines.
So if you ever count your code, look at what’s actually in the folders first. A plain count was off by 3x for me.
How Claude counted
This is what I typed:
Could you list all of the projects I have in [my projects folder] that are code based, and list them by how many files of code and how many lines of code, not counting comments or tests.
One Claude session wrote a 290-line Python script to do the counting. It ran it over the folder, looked at what came back, and ran it again with the junk taken out. The whole thing took 42 minutes. The first pass alone took 30 of them, mostly reading folders that didn’t count.
The script was strict from the start. It only read code files, and it already skipped the usual folders of downloaded libraries and built files. That still came to 3,104,925 lines in 14,250 files. Here’s how it got from there to the real number, one layer at a time:
- Lines of code the first scan found 3,104,925 29 project folders, 14,250 code files. Blank lines, comments, tests and the usual dependency folders were already out.
- Copies of this blog −875,824 Six git worktrees: separate checkouts that sessions make so they can work on a post without touching my copy. Each carries the games, decks and labs the site hosts.
- blog-context-window: 142,167 lines
- Four more at 124,000 to 125,000 each
- blog-crimson-yt: 118,455
- The hosted pages in my own copy: 116,441
- Test reports a game wrote −768,489 Blackwater Godot's test framework writes an HTML report for every run, and HTML counts as code. 941 runs, one folder each.
- Other people's code −244,250 Copied into my folders to build on.
- Two copies of alice's Claude Paint simulator
- Decompiled game source and a mod maker inside a MEGABONK mod
- The three.js library inside a racing game: 30,122
- The gdUnit4 test framework: 18,571
- Backups, publish copies and built bundles −185,991 The course's copy of the blog it publishes to, old takes of lessons, a wallpaper app's snapshot and built bundles, a render's temp folder.
In the chart, a worktree is one of those agent copies of the blog. Blackwater Godot is my cave-diving game BLACKWATER rebuilt in the Godot game engine, and gdUnit4 is the test tool that writes its reports. The other people’s code includes alice’s Claude Paint, the oil paint simulator Claude paints with, and the game Megabonk’s own code, copied into my mod for it.
The biggest projects
The biggest real project is my AI-made TV series, I Love My Evening Television, at 205,234 lines. That’s about a fifth of everything, because every episode builds its own tools. Each episode is a 30-minute film Claude makes, and the count has three of them. Crimson Coil is 56,167 lines, Earthlight 72,596 and Context Window 73,442. Most of it is Python.
Here’s all of it, by project or by language:
| Project | Python | JavaScript | HTML | GDScript | C# | TypeScript | CSS | Lua | C/C++ | Kotlin | Shell | PowerShell | Shader | Astro | Batch | SQL |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| I Love My Evening Television | 153870 | 15090 | 2018 | 23837 | 9135 | 1019 | 199 | 66 | ||||||||
| Gauntlet Test | 4825 | 56957 | 51889 | 2369 | 86 | 20 | ||||||||||
| Courses | 18325 | 50013 | 15430 | 704 | 73 | 28 | ||||||||||
| Sandbox 2 | 52401 | 818 | 5639 | 11886 | 2096 | 7162 | 1146 | 1839 | 156 | 5 | ||||||
| Blackwater Godot | 21484 | 2507 | 680 | 48726 | 1918 | 1832 | 314 | 1642 | 2 | |||||||
| Wallpaper Breaker | 11188 | 186 | 305 | 11346 | 35392 | 436 | 6 | 276 | 2 | |||||||
| Blackwater with MCP | 11428 | 100 | 41242 | 1784 | 263 | 64 | 94 | |||||||||
| Storm Bell Fighter Game | 32510 | 828 | 19315 | 285 | 75 | 1234 | ||||||||||
| LLM Monster Hunter 2 | 22382 | 26302 | 49 | 4559 | 258 | 0 | ||||||||||
| Sandbox | 5938 | 17826 | 9665 | 12823 | 582 | 21 | ||||||||||
| My Blog (this site and its tools) | 8536 | 17720 | 2953 | 41 | 2455 | 656 | 555 | 1491 | 41 | 450 | ||||||
| Storm Bell Fighter | 28743 | 396 | 67 | 17 | ||||||||||||
| Claude Playback Lens | 23841 | 50 | 2653 | 16 | 14 | |||||||||||
| Japanese Learning Programs | 11160 | 7370 | 4540 | 581 | 28 | |||||||||||
| Music | 1027 | 162 | 9244 | 7181 | 193 | |||||||||||
| Black Ops Cave Diver | 670 | 17 | 15213 | 1134 | 4 | |||||||||||
| MySillyTavern | 4121 | 7948 | 67 | 76 | ||||||||||||
| Jet Brigade Racers | 2154 | 4663 | 395 | 943 | 16 | |||||||||||
| ComfyUI scripts | 7784 | 124 | 84 | 31 | 18 | |||||||||||
| Reading Pacer v2 | 2708 | 31 | 27 | |||||||||||||
| Bad Very Bad | 2585 | 29 | 75 | 43 | ||||||||||||
| OpenClaw Management | 180 | 965 | 549 | 914 | ||||||||||||
| Showreel 2026 | 1372 | 744 | 138 | 14 | ||||||||||||
| Blender Paper Films | 2009 | |||||||||||||||
| MyLLMApp | 1152 | 37 | ||||||||||||||
| Brand Designs | 1030 | |||||||||||||||
| Runpod Render Kit | 796 | 61 | ||||||||||||||
| Canvas Films | 28 | 208 | ||||||||||||||
| Jev | 63 |
- Second is Gauntlet Test at 116,146 lines, and it’s one job built ten times. Two Claude models, Opus 5.5 and Sonnet 5.5, each built the same brief at five effort levels. Effort is a setting for how much work the model puts into a job. The test is in my post comparing the two models.
- Python is 40% of it all, 408,769 lines. JavaScript is 22% and HTML 10%. The games bring GDScript, the Godot engine’s own language, and C#.
In AI tokens
In AI terms that’s roughly 15 million tokens, the chunks AI models read and write. My Claude sessions have written about 218 million tokens since July, so about one in every 12 to 17 of them is still standing as code.
How the token estimate works
- When I asked how many tokens that is, Claude measured characters instead of guessing from lines. The counted lines hold 53.8 million characters with their indentation.
- Code runs about three to four characters per token, so that’s somewhere between 13 and 18 million tokens. Nobody ran the files through a token counter, so it stays a range.
- The 218.5 million comes from Playback Lens, my tool that reads every Claude Code session on my laptop. It covers 498 sessions since 7 July.
- It isn’t a fair comparison. Those tokens include thinking, every reply, files written and rewritten and deleted, and work in folders this scan never looked at.
- What my sessions cost is in my post on Claude Code costs.
What the count left out
- 23 older projects I’d moved to OneDrive weren’t counted. They’re online-only, and scanning them would have downloaded about 2 GB.
- Tests were left out on purpose: 148,282 lines in 1,101 files. A third of them, 47,338 lines, belong to Blackwater Godot, the same game that wrote the 941 reports.
- The count moves. Running it again the next morning gave 1,038,996, while a film session kept working.
- The rules are judgment calls. HTML and CSS count, and a long prompt inside a Python file counts. Change those and the total moves by tens of thousands.
- Two folders point at the same game, Storm Bell Fighter, so about 26,000 lines are counted twice.