GitHub's sidebar shows language percentages but not actual line counts. OctoCounts fills in the missing numbers: paste any public GitHub repository URL and it downloads the source archive, runs tokei, and returns files, total lines, code lines, comments, blanks, and per-language totals, faster than a git clone. Any branch, tag, or commit SHA can be analyzed, and results are pinned to the exact commit and cached, so repeat views are instant.
Reports live on permanent pages that can be exported as text, JSON, or a shareable PNG card, embedded in any README as a live SLOC badge, or compared side by side with the built-in compare and diff tools (about 90 curated pairs, like React vs Vue and Rust vs Go). A public API and an MCP server let other tools and agents fetch the same reports.
OctoCounts also ships as a browser extension for Chrome, Edge, and Firefox that shows the counts directly inside GitHub's repository sidebar, plus a GitHub Action that comments SLOC changes on pull requests and a CLI (npx octocounts). It is free and open source under MIT.
Comments
Add a CommentHandy tool — tokei is fast and the code/comments/blank split is exactly what GitHub's sidebar is missing. Any plans to support private repos via OAuth?
I'm hesitating because I'd need to download the code to my server; if a bug occurs, the private repository could be exposed, and I haven't come up with a good solution yet.
Pinning results to the exact commit SHA is a smart touch. The GitHub Action that comments SLOC changes on PRs looks really handy for spotting bloat during review.
thank you
Really useful tool for developers! GitHub’s language percentages don't always show the full picture, so having actual line counts and detailed breakdowns is valuable.
please also try the chrome extension, it can show the SLOC inside the github webpage like below
Do you count generated or vendored files (lockfiles, node_modules checked in, minified bundles) or exclude them? For repos like that the raw number can be misleading, so a toggle would be handy.
The archive-plus-tokei path is the right tradeoff versus a full clone, especially with results pinned to a commit. Before I would trust the README badge next to the GitHub Action comment, I would want to know whether both use the same ignore rules for generated and vendored files, because a repo with a large dist or vendor folder would otherwise look bigger than the source that reviewers actually read.
very good
I love that it can ship an extension for browsers
GitHub tells you a repo is "62% TypeScript" but never how much code that actually is. OctoCounts fixes that in seconds—paste a URL and you get files, total lines, code, comments, blanks, and per-language breakdowns. Way faster than cloning and running tokei myself. This should be a native GitHub feature.
You can try the browser extension, it can show the SLOC info in github page without copy and paste the repo url
Pinning each report to a commit and caching it is a really practical touch — it makes the compare view something you can trust across CI runs rather than a one-off number.
continue the great work. i love the project.
nice
The line-count reports and the compare view are genuinely useful — pinned commits plus exportable cards make this easy to drop into a README.
The public API and MCP endpoint make this useful for CI workflows. Your FAQ says there is no publicly documented rate limit yet. Could you publish a suggested request rate and how clients should handle throttling (for example 429 / Retry-After)? That would help teams integrate without putting unexpected load on the service.
The README badge is a nice touch for open-source maintainers. Does the PR comment from the GitHub Action show the diff per language, or just the total SLOC change? Per-language would help catch someone accidentally committing a big generated JSON or minified file.
https://api.octocounts.com/badge/:owner/:repo/branch/:branch?lang=rust it support
lang=xxxlike above to show sloc for a specific languagePinning each report to the exact commit and caching it is a smart touch, since repo line counts shift constantly. Do the tokei counts respect .gitattributes linguist-generated or vendored paths, or is it a raw file-type count? That would change how comparable two repos are in the compare view.
it doesn't support .gitattributes
The commit-pinned reports and reusable exports make the product more useful than a one-off line counter. A helpful next step would be to surface the ignore rules prominently in each report, especially for generated files and vendored dependencies, so comparisons between repositories remain easy to interpret.
Good suggestion, thank you
amazing product!!
nice
Nice tool !
Very Interesting tool
thank you, if you have any feedback I would love to read