OctoCounts is a free browser extension that adds a SLOC (source lines of code) card to public GitHub repository pages. The card shows the repository's total line count at a glance; clicking it opens a full panel with files, code lines, comment lines, blank lines, and a per-language breakdown — the same counts the OctoCounts web app produces with tokei, pinned to an exact commit.
Install from Chrome Web Store Install from Microsoft Edge Add-ons Install from Firefox Add-ons
The extension reads the public GitHub repository page you are viewing to detect the owner and repository name, and runs the count against public data through the OctoCounts API. Counting public repositories needs no GitHub login or API token. Chrome builds also offer optional GitHub sign-in for star history; the extension stores the login and token locally and uses the backend during token exchange. See the privacy policy for details. Retained local results for the repository and ref can be reused on repeat visits; a missing or expired entry requires a new request.
Public GitHub repositories. Private repositories and source-code uploads are not supported; to count private code, run tokei locally.
The card renders on public GitHub repository pages. It does not appear on private repositories (OctoCounts analyzes public repositories only), non-repository pages, or while GitHub ships layout changes. Reload the page first; if the card is still missing on a public repository, check the extension is enabled and report the GitHub URL via the OctoCounts repository.
Local counts are cached by repository and ref, and each report identifies the exact commit counted. A retained entry can be reused; missing or expired entries need a new request. A refreshed count can change when the commit, engine, or effective counting rules change. The full panel shows the measured commit.
Chrome, Edge, and Firefox, via their official extension stores. The extension source code is open and publicly available.
Extension source code: https://github.com/huanglizhuo/OctoCounts.