# See GitHub code statistics in your browser

Install the OctoCounts browser extension for Chrome, Edge, or Firefox to see source lines of code — files, code, comments, blanks, and per-language totals — directly in the GitHub repository sidebar.

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

- [Install OctoCounts from Chrome Web Store](https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj)
- [Install OctoCounts from Microsoft Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim)
- [Install OctoCounts from Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/)

## 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. It does not request GitHub account access, needs no API token, works on public repositories only, and collects no personal data. Results are cached locally and by repository and ref so repeat visits load instantly.

## Supported repositories

Public GitHub repositories. Private repositories and source-code uploads are not supported; to count private code, run [tokei](https://github.com/XAMPPRocky/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?

Counts are cached by repository and ref, and each report is pinned to the exact commit that was counted, so the same page shows the same numbers until the repository moves on and the cache refreshes. The full panel shows the commit the count comes from.

### 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](https://github.com/huanglizhuo/OctoCounts).

## Related OctoCounts pages

- [OctoCounts web app](https://octocounts.com/)
- [Compare two repositories](https://octocounts.com/compare)
- [GitHub SLOC badges for your README](https://octocounts.com/badges)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [OctoCounts API docs](https://octocounts.com/docs/api)
