See GitHub code statistics in your browser

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

Install in three steps

  1. Install OctoCounts from the Chrome Web Store, Microsoft Edge Add-ons, or Firefox Add-ons — one click, no account.
  2. Open any public GitHub repository page in your browser.
  3. The SLOC card appears in the repository sidebar automatically. Click it to open the full panel with the per-language line breakdown.

Permissions and data handling

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.

Supported repositories

Public GitHub repositories. Private repositories and source-code uploads are not supported; to count private code, run tokei locally.

Extension FAQ

Why does the SLOC card not appear on a repository page?

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.

Are the numbers live or cached?

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.

Which browsers are supported?

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.