OctoCounts — GitHub and GitLab SLOC Counter
GitHub shows language bars, but it does not show actual files, code lines, comments, blanks, or per-language totals. OctoCounts is a free SLOC counter for public GitHub and GitLab repositories. Install OctoCounts from the Chrome Web Store or OctoCounts from Firefox Add-ons to see SLOC directly in GitHub's repo sidebar, or paste a public GitHub/GitLab repo URL into the web app for a full report. OctoCounts downloads the archive tarball, runs tokei, caches the result by commit SHA, and returns a sortable breakdown without cloning.
Why use OctoCounts instead of cloning and running tokei locally?
OctoCounts downloads a compressed archive tarball rather than a full git clone with history, which is significantly faster for large repositories. It caches results by commit SHA, tokei version, and analysis options, so any repeated analysis of the same commit returns instantly with zero re-processing. There is nothing to install — paste a public GitHub or GitLab URL and get results in seconds.
What is OctoCounts?
OctoCounts is a source lines of code (SLOC) counter for public GitHub and GitLab repositories. The browser extension adds a sidebar card on GitHub repo pages, then opens a full panel with files, total lines, code lines, comment lines, blank lines, language rows, local cache, auto-analyze settings, and placement settings. The web app resolves the requested branch, tag, or commit SHA via the host API, downloads the archive tarball, runs tokei in a background worker, and returns a language-by-language breakdown. Results are cached by commit SHA, tokei version, and analysis options so repeat queries are instant.
How does OctoCounts work?
- Resolve: OctoCounts validates the GitHub URL and pins the run to a specific commit SHA using the GitHub API.
- Count: The Rust backend (Axum + Tokio) downloads the repository archive, extracts it, and runs tokei for language statistics in a queued worker job.
- Cache: Reports are stored by owner, repo, commit SHA, and tokei version. Re-analysis of the same commit is instant — no re-download, no re-count.
Frequently Asked Questions
What is SLOC?
SLOC stands for Source Lines of Code. It is a software metric used to measure the size of a program by counting lines in its source code. OctoCounts reports total lines, code lines, comment lines, and blank lines per language, plus aggregate totals across the repository.
What programming languages does OctoCounts support?
OctoCounts uses tokei for language detection, which supports over 200 programming languages and file types including Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, Ruby, Swift, Kotlin, and many more.
Does OctoCounts support GitLab?
Yes. The web app supports public GitLab repositories on gitlab.com as well as public GitHub repositories. Browser extension sidebar cards are focused on GitHub repository pages.
Does OctoCounts have a browser extension?
Yes. Install OctoCounts — GitHub SLOC from the Chrome Web Store or OctoCounts — GitHub SLOC from Firefox Add-ons to add a SLOC card directly to GitHub repository sidebars. The card shows repository line-count status and opens the full extension panel.
Is OctoCounts free to use?
Yes. OctoCounts is completely free to use for public GitHub and GitLab repositories. No account or authentication is required.
Can I export the source line count results?
Yes. OctoCounts supports three export formats: plain text (copy to clipboard), JSON (full report with per-language stats), and a shareable PNG card showing the language breakdown at 1200×630 resolution.
Does OctoCounts support private repositories?
OctoCounts supports public GitHub and GitLab repositories only. It does not request GitHub or GitLab account access, does not support private repositories, and does not accept source-code uploads.