OctoCounts — GitHub SLOC Counter
OctoCounts is a free web tool that counts source lines of code in any public GitHub repository without cloning. It downloads the archive tarball, runs tokei to count lines across 200+ programming languages, caches the result by commit SHA, and returns a sortable breakdown — faster than a local clone for most large repos.
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 and tokei version, so any repeated analysis of the same commit returns instantly with zero re-processing. There is nothing to install — paste a GitHub URL and get results in seconds.
What is OctoCounts?
OctoCounts is a source lines of code (SLOC) counter for GitHub repositories. It accepts any public GitHub URL, resolves the requested branch, tag, or commit SHA via the GitHub API, downloads the archive tarball, runs tokei in a background worker, and returns a language-by-language breakdown showing files, total lines, code lines, comment lines, and blank lines. Results are cached by commit SHA and tokei version 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.
Is OctoCounts free to use?
Yes. OctoCounts is completely free to use for public GitHub 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 currently supports public GitHub repositories only. Private repositories require authentication which is not yet supported.