PageSourceSearch

https://octocounts.com/

html octocounts.com collected 2026-10-02 00:32:02 UTC 62,402 bytes, 186 lines download raw bytes

1<!doctype html>
2<html lang="en">
3  <head>
4    <meta charset="UTF-8" />
5    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6    <meta name="description" content="OctoCounts is a free SLOC counter for public GitHub repositories. Count files, code lines, comments, blanks, and language totals without cloning." />
7    <meta name="robots" content="index,follow,max-image-preview:large,max-snippet:-1,max-video-preview:-1" />
8    <meta name="application-name" content="OctoCounts" />
9    <meta name="apple-mobile-web-app-title" content="OctoCounts" />
10    <meta name="keywords" content="SLOC counter, GitHub line count, source lines of code, count lines of code, tokei web app, repository size, code metrics" />
11    <meta name="theme-color" content="#151d1a" />
12    <meta name="theme-color" media="(prefers-color-scheme: light)" content="#f2eee4" />
13    <link rel="canonical" href="https://octocounts.com/" />
14    <link rel="alternate" type="text/plain" href="https://octocounts.com/llms.txt" title="OctoCounts LLM summary" />
15    <link rel="help" href="https://octocounts.com/docs/github-sloc-counter" />
16    <link rel="icon" href="/favicon.ico" sizes="any" />
17    <link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png" />
18    <link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png" />
19    <link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png" />
20    <link rel="manifest" href="/site.webmanifest" />
21    <link rel="preconnect" href="https://api.octocounts.com" crossorigin />
22    <!-- Only the mono 700 is preloaded: the topbar brand wordmark renders it
23         on the first screen. No CSS rule renders JetBrains Mono at 800 (the
24         hero h1's font-weight:800 sits on the system sans stack), so its
25         ~20.7 KiB preload was pure dead critical-path weight; the face itself
26         stays declared in styles.css for any future 800 mono text. -->
27    <link rel="preload" as="font" href="/fonts/jetbrains-mono-700-latin.woff2" type="font/woff2" crossorigin />
28    
28<script>{let t=null;try{t=localStorage.getItem("octocounts.theme")}catch{}document.documentElement.dataset.scheme="matrix"===t||"paper"===t?t:matchMedia("(prefers-color-scheme: dark)").matches?"matrix":"paper"}try{const p=new URLSearchParams(location.search),l=p.get("lng")||localStorage.getItem("i18nextLng")||navigator.language.split("-")[0];if(l&&l!=="en")document.documentElement.lang=l}catch{}</script>
28
29    
29<script defer src="https://cloud.umami.is/script.js" data-website-id="4f3a87a4-fd4c-4dc5-8959-8fcf93e858c7"></script>
29
30    <!-- Open Graph -->
31    <meta property="og:type" content="website" />
32    <meta property="og:url" content="https://octocounts.com/" />
33    <meta property="og:site_name" content="OctoCounts" />
34    <meta property="og:locale" content="en_US" />
35    <meta property="og:title" content="OctoCounts – GitHub SLOC Counter" />
36    <meta property="og:description" content="Install the Chrome, Edge, or Firefox extension for GitHub repo sidebar SLOC, or paste a public GitHub URL into the web app for a full report." />
37    <meta property="og:image" content="https://octocounts.com/og-image.jpg" />
38    <meta property="og:image:alt" content="OctoCounts source line count report preview" />
39    <meta property="og:image:width" content="1200" />
40    <meta property="og:image:height" content="630" />
41    <!-- Twitter Card -->
42    <meta name="twitter:card" content="summary_large_image" />
43    <meta name="twitter:title" content="OctoCounts – GitHub SLOC Counter" />
44    <meta name="twitter:description" content="See actual source line counts for public GitHub repositories: files, code, comments, blanks, and language totals." />
45    <meta name="twitter:image" content="https://octocounts.com/og-image.jpg" />
46    <title>OctoCounts – GitHub SLOC Counter</title>
47    
47<script type="application/ld+json">
48    {
49      "@context": "https://schema.org",
50      "@type": "WebApplication",
51      "@id": "https://octocounts.com/#app",
52      "name": "OctoCounts",
53      "url": "https://octocounts.com/",
54      "description": "OctoCounts shows actual source line counts for public GitHub repositories in browser extension sidebars or the web app: files, code lines, comments, blanks, and per-language totals. No cloning required.",
55      "applicationCategory": "DeveloperApplication",
56      "datePublished": "2026-05-02",
57      "operatingSystem": "Any",
58      "browserRequirements": "Requires Chrome, Edge, or Firefox",
59      "softwareVersion": "0.5.1",
60      "screenshot": "https://octocounts.com/og-image.jpg",
61      "downloadUrl": "https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj",
62      "offers": {
63        "@type": "Offer",
64        "price": "0",
65        "priceCurrency": "USD"
66      },
67      "featureList": [
68        "SLOC counting by language",
69        "Chrome, Edge, and Firefox extensions add a SLOC card to GitHub repository sidebars",
70        "Public GitHub repository analysis",
71        "No git clone required",
72        "Results cached by commit SHA",
73        "Export as PNG, JSON, or plain text",
74        "Supports branches, tags, and commit SHAs"
75      ],
76      "author": {
77        "@type": "Person",
78        "@id": "https://github.com/huanglizhuo",
79        "name": "huanglizhuo",
80        "url": "https://github.com/huanglizhuo"
81      },
82      "sameAs": [
83        "https://github.com/huanglizhuo/OctoCounts",
84        "https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj",
85        "https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim",
86        "https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/"
87      ]
88    }
89    </script>
89
90    <!-- The homepage's FAQPage JSON-LD is no longer a static block here: it is
91         rendered inside the prerendered homepage's own body by the React FAQ
92         section (src/homeFaq.ts is the single source for both the visible
93         answers and the structured data, EN and ZH). This shell is what every
94         non-home route serves, and those routes replace the head JSON-LD with
95         their own anyway. -->
96    
96<script type="application/ld+json">
97    {
98      "@context": "https://schema.org",
99      "@type": "WebSite",
100      "@id": "https://octocounts.com/#website",
101      "name": "OctoCounts",
102      "url": "https://octocounts.com/",
103      "description": "Free GitHub SLOC counter. See source line counts for public repositories: files, code, comments, blanks, and language totals. No cloning required.",
104      "dateModified": "2026-09-16",
105      "potentialAction": {
106        "@type": "SearchAction",
107        "target": {
108          "@type": "EntryPoint",
109          "urlTemplate": "https://octocounts.com/?q={search_term_string}"
110        },
111        "query-input": "required name=search_term_string"
112      }
113    }
114    </script>
114
115    
115<script type="application/ld+json">
116    {
117      "@context": "https://schema.org",
118      "@type": "Organization",
119      "@id": "https://octocounts.com/#organization",
120      "name": "OctoCounts",
121      "url": "https://octocounts.com/",
122      "logo": "https://octocounts.com/favicons/web-app-manifest-512x512.png",
123      "sameAs": [
124        "https://github.com/huanglizhuo/OctoCounts",
125        "https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj",
126        "https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim",
127        "https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/"
128      ]
129    }
130    </script>
130
131    <!-- No aggregateRating here: Google's structured-data policy requires a
132         rating asserted on a page to be visibly displayed on that same page,
133         and octocounts.com has no rating UI. The real 5.0/118 figure lives on
134         the Chrome Web Store listing itself (linked via downloadUrl/sameAs
135         below) — assert it there, not here. -->
136    
136<script type="application/ld+json">
137    {
138      "@context": "https://schema.org",
139      "@type": "SoftwareApplication",
140      "@id": "https://octocounts.com/#extension",
141      "name": "OctoCounts – GitHub SLOC & Code Statistics",
142      "operatingSystem": "Chrome, Edge, Firefox",
143      "applicationCategory": "BrowserApplication",
144      "datePublished": "2026-05-05",
145      "offers": {
146        "@type": "Offer",
147        "price": "0",
148        "priceCurrency": "USD"
149      },
150      "url": "https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj",
151      "downloadUrl": "https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj",
152      "screenshot": "https://octocounts.com/og-image.jpg",
153      "description": "Browser extension that adds a SLOC card to GitHub repository sidebars, showing source line counts per language without cloning.",
154      "author": {
155        "@type": "Person",
156        "@id": "https://github.com/huanglizhuo",
157        "name": "huanglizhuo",
158        "url": "https://github.com/huanglizhuo"
159      }
160    }
161    </script>
161
162    
162<script type="application/ld+json">
163    {
164      "@context": "https://schema.org",
165      "@type": "Person",
166      "@id": "https://github.com/huanglizhuo",
167      "name": "huanglizhuo",
168      "url": "https://github.com/huanglizhuo",
169      "sameAs": ["https://github.com/huanglizhuo"],
170      "knowsAbout": ["source lines of code", "code metrics", "tokei", "developer tools", "Rust", "TypeScript"],
171      "jobTitle": "Software Developer",
172      "image": "https://octocounts.com/og-image.jpg",
173      "description": "Developer and maintainer of OctoCounts, a free source lines of code counter for public GitHub repositories."
174    }
175    </script>
175
176    
176<script type="module" crossorigin src="/assets/index-B9etCNLl.js"></script>
176
177    <link rel="modulepreload" crossorigin href="/assets/vendor-react-DbFVZiS9.js">
178    <link rel="modulepreload" crossorigin href="/assets/vendor-query-qQWDno7u.js">
179    <link rel="modulepreload" crossorigin href="/assets/vendor-i18n-k0TTF2pe.js">
180    <link rel="stylesheet" crossorigin href="/assets/index-CCGeAlkC.css">
181  </head>
182  <body>
183    <div id="root" data-oc-prerender="home" data-oc-locale="en"><link rel="preload" as="image" href="/octocounts-logo-96.webp"/><a class="skip-link" href="#main">Skip to content</a><main id="main" class="page"><header class="topbar"><a class="brand" href="/" aria-label="OctoCounts"><div class="logo"><img src="/octocounts-logo-96.webp" alt="" width="96" height="96"/></div><span class="brand-name">OctoCounts</span></a><nav class="topbar-nav" aria-label="Primary navigation"><a href="/" aria-current="page">Analyze</a><details class="topbar-menu  "><summary aria-expanded="false" aria-controls="topbar-popover-explore"><span class="topbar-menu-label">Explore</span></summary><div class="topbar-popover" id="topbar-popover-explore"><a href="/stats">Stats</a><a href="/recent">Recent</a><a href="/popular">Popular</a><a href="/trending">Trending</a><a href="/hall-of-monoliths">Hall</a></div></details><details class="topbar-menu  "><summary aria-expanded="false" aria-controls="topbar-popover-tools"><span class="topbar-menu-label">Tools</span></summary><div class="topbar-popover" id="topbar-popover-tools"><a href="/compare">Compare repositories</a><a href="/diff">Diff refs</a><a href="/badges">Badges &amp; embeds</a></div></details><details class="topbar-menu topbar-install "><summary aria-expanded="false" aria-controls="topbar-popover-install"><span class="topbar-menu-label">Install extension</span><i class="install-dot" aria-hidden="true"></i><span class="topbar-menu-short">Install</span></summary><div class="topbar-popover" id="topbar-popover-install"><a href="https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z"></path></svg> <!-- -->Chrome</a><a href="https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M21.86 13.34c0-5.2-4.16-9.42-9.3-9.42-4.63 0-8.48 3.43-9.18 7.91.96-1.72 2.91-3.3 5.87-3.3 3.54 0 5.85 2.05 5.85 4.8H7.56c.24 2.65 2.43 4.42 5.47 4.42 2.12 0 4.05-.73 5.54-2.13-.89 2.88-3.57 4.46-6.85 4.46C5.64 20.08 1 16.12 1 10.45 1 4.68 5.77 0 11.65 0 18.38 0 23 4.77 23 11.35c0 .69-.06 1.35-.18 1.99h-.96Z"></path></svg> <!-- -->Edge</a><a href="https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.452 3.445a11.002 11.002 0 00-2.482-1.908C16.944.997 15.098.093 12.477.032c-.734-.017-1.457.03-2.174.144-.72.114-1.398.292-2.118.56-1.017.377-1.996.975-2.574 1.554.583-.349 1.476-.733 2.55-.992a10.083 10.083 0 013.729-.167c2.341.34 4.178 1.381 5.48 2.625a8.066 8.066 0 011.298 1.587c1.468 2.382 1.33 5.376.184 7.142-.85 1.312-2.67 2.544-4.37 2.53-.583-.023-1.438-.152-2.25-.566-2.629-1.343-3.021-4.688-1.118-6.306-.632-.136-1.82.13-2.646 1.363-.742 1.107-.7 2.816-.242 4.028a6.473 6.473 0 01-.59-1.895 7.695 7.695 0 01.416-3.845A8.212 8.212 0 019.45 5.399c.896-1.069 1.908-1.72 2.75-2.005-.54-.471-1.411-.738-2.421-.767C8.31 2.583 6.327 3.061 4.7 4.41a8.148 8.148 0 00-1.976 2.414c-.455.836-.691 1.659-.697 1.678.122-1.445.704-2.994 1.248-4.055-.79.413-1.827 1.668-2.41 3.042C.095 9.37-.2 11.608.14 13.989c.966 5.668 5.9 9.982 11.843 9.982C18.62 23.971 24 18.591 24 11.956a11.93 11.93 0 00-3.548-8.511z"></path></svg> <!-- -->Firefox</a></div></details></nav>
183<div class="topbar-controls" role="group" aria-label="Language"><button type="button" class="lang-btn" aria-current="true">EN</button><button type="button" class="lang-btn">中文</button><button class="theme-toggle" type="button" aria-label="Toggle dark or light theme" aria-pressed="true" title="Toggle dark or light theme — Switch to day mode"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><span class="visually-hidden">Toggle dark or light theme</span></button><a class="github-link icon-link" href="https://github.com/huanglizhuo/OctoCounts" target="_blank" rel="noreferrer" aria-label="View OctoCounts on GitHub">GitHub</a></div><details class="topbar-menu  topbar-site-menu"><summary aria-expanded="false" aria-controls="topbar-popover-site"><span class="topbar-menu-label"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu" aria-hidden="true"><line x1="4" x2="20" y1="12" y2="12"></line><line x1="4" x2="20" y1="6" y2="6"></line><line x1="4" x2="20" y1="18" y2="18"></line></svg><span class="visually-hidden">Menu</span></span></summary><div class="topbar-popover" id="topbar-popover-site"><div class="site-menu-group"><a href="/" aria-current="page">Analyze</a><a href="/stats">Stats</a><a href="/recent">Recent</a><a href="/popular">Popular</a><a href="/trending">Trending</a><a href="/hall-of-monoliths">Hall</a><a href="/compare">Compare repositories</a><a href="/diff">Diff refs</a><a href="/badges">Badges &amp; embeds</a><a href="/extension">Extension</a></div><div class="site-menu-group"><a href="https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z"></path></svg> <!-- -->Chrome</a><a href="https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M21.86 13.34c0-5.2-4.16-9.42-9.3-9.42-4.63 0-8.48 3.43-9.18 7.91.96-1.72 2.91-3.3 5.87-3.3 3.54 0 5.85 2.05 5.85 4.8H7.56c.24 2.65 2.43 4.42 5.47 4.42 2.12 0 4.05-.73 5.54-2.13-.89 2.88-3.57 4.46-6.85 4.46C5.64 20.08 1 16.12 1 10.45 1 4.68 5.77 0 11.65 0 18.38 0 23 4.77 23 11.35c0 .69-.06 1.35-.18 1.99h-.96Z"></path></svg> <!-- -->Edge</a><a href="https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.452 3.445a11.002 11.002 0 00-2.482-1.908C16.944.997 15.098.093 12.477.032c-.734-.017-1.457.03-2.174.144-.72.114-1.398.292-2.118.56-1.017.377-1.996.975-2.574 1.554.583-.349 1.476-.733 2.55-.992a10.083 10.083 0 013.729-.167c2.341.34 4.178 1.381 5.48 2.625a8.066 8.066 0 011.298 1.587c1.468 2.382 1.33 5.376.184 7.142-.85 1.312-2.67 2.544-4.37 2.53-.583-.023-1.438-.152-2.25-.566-2.629-1.343-3.021-4.688-1.118-6.306-.632-.136-1.82.13-2.646 1.363-.742 1.107-.7 2.816-.242 4.028a6.473 6.473 0 01-.59-1.895 7.695 7.695 0 01.416-3.845A8.212 8.212 0 019.45 5.399c.896-1.069 1.908-1.72 2.75-2.005-.54-.471-1.411-.738-2.421-.767C8.31 2.583 6.327 3.061 4.7 4.41a8.148 8.148 0 00-1.976 2.414c-.455.836-.691 1.659-.697 1.678.122-1.445.704-2.994 1.248-4.055-.79.413-1.827 1.668-2.41 3.042C.095 9.37-.2 11.608.14 13.989c.966 5.668 5.9 9.982 11.843 9.982C18.62 23.971 24 18.591 24 11.956a11.93 11.93 0 00-3.548-8.511z"></path></svg> <!-- -->Firefox</a></div><div class="site-menu-group site-menu-preferences"><button type="button" class="lang-btn" aria-current="true">EN</button><button type="button" class="lang-btn">中文</button><button class="theme-toggle" type="button" aria-label="Toggle dark or light theme" aria-pressed="true" title="Toggle dark or light theme — Switch to day mode"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><span class="visually-hidden">Toggle dark or light theme</span></button><a href="https://github.com/huanglizhuo/OctoCounts" target="_blank" rel="noreferrer">GitHub</a></div></div></details></header><section class="hero " aria-labelledby="hero-title"><div class="hero-left">
183<h1 id="hero-title" class="title">Count lines of code in GitHub repositories</h1><p class="subtitle">Paste a public GitHub repository URL to get files, code, comment, and blank line totals per language. Free, no sign-up, no clone — powered by <a href="https://github.com/XAMPPRocky/tokei" target="_blank" rel="noreferrer">tokei</a>.</p><p class="hero-trust">Open source · 200+ languages</p><form class="input-row"><span class="prompt">$</span><input id="repo-url" placeholder="https://github.com/owner/repo" aria-label="Repository URL" name="repoUrl" value=""/><label class="ref">ref<input id="repo-ref" placeholder="default" aria-label="Optional ref" name="refName" value="main"/></label><button class="btn"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play" aria-hidden="true"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg>Analyze</button></form><details class="analysis-options"><summary>Advanced analysis options</summary><div class="analysis-options-grid"><label><span>Profile</span><select name="analysisProfile"><option value="default" selected="">Default</option><option value="source-only">Source only</option></select></label><label><span>Ignore dirs</span><input placeholder="examples, fixtures" name="ignoredDirs" value=""/></label><label><span>Ignore languages</span><input placeholder="Markdown, JSON" name="ignoredLanguages" value=""/></label><div class="analysis-toggles"><label><input type="checkbox" name="includeDocs" checked=""/>Include docs</label><label><input type="checkbox" name="includeTests" checked=""/>Include tests</label><label><input type="checkbox" name="includeGenerated" checked=""/>Include generated</label></div></div></details><div class="quick-rows samples-row" role="group" aria-label="Example repositories"><span class="samples-try">try:</span><button class="chip " type="button" aria-pressed="false">react</button><button class="chip " type="button" aria-pressed="false">vscode</button><button class="chip " type="button" aria-pressed="false">vite</button><button class="chip " type="button" aria-pressed="false">axum</button></div><div class="hero-paths hero-paths-line"><span>Also: see SLOC right in GitHub&#x27;s sidebar</span><a class="copybtn install-btn hero-store-link" href="https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj" target="_blank" rel="noreferrer"><svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z"></path></svg>Add to Chrome</a><details class="hero-other-browsers"><summary>Other browsers</summary><div><a class="copybtn install-btn hero-store-link" href="https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim" target="_blank" rel="noreferrer"><svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M21.86 13.34c0-5.2-4.16-9.42-9.3-9.42-4.63 0-8.48 3.43-9.18 7.91.96-1.72 2.91-3.3 5.87-3.3 3.54 0 5.85 2.05 5.85 4.8H7.56c.24 2.65 2.43 4.42 5.47 4.42 2.12 0 4.05-.73 5.54-2.13-.89 2.88-3.57 4.46-6.85 4.46C5.64 20.08 1 16.12 1 10.45 1 4.68 5.77 0 11.65 0 18.38 0 23 4.77 23 11.35c0 .69-.06 1.35-.18 1.99h-.96Z"></path></svg>Edge</a><a class="copybtn install-btn hero-store-link" href="https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/" target="_blank" rel="noreferrer"><svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.452 3.445a11.002 11.002 0 00-2.482-1.908C16.944.997 15.098.093 12.477.032c-.734-.017-1.457.03-2.174.144-.72.114-1.398.292-2.118.56-1.017.377-1.996.975-2.574 1.554.583-.349 1.476-.733 2.55-.992a10.083 10.083 0 013.729-.167c2.341.34 4.178 1.381 5.48 2.625a8.066 8.066 0 011.298 1.587c1.468 2.382 
1831.33 5.376.184 7.142-.85 1.312-2.67 2.544-4.37 2.53-.583-.023-1.438-.152-2.25-.566-2.629-1.343-3.021-4.688-1.118-6.306-.632-.136-1.82.13-2.646 1.363-.742 1.107-.7 2.816-.242 4.028a6.473 6.473 0 01-.59-1.895 7.695 7.695 0 01.416-3.845A8.212 8.212 0 019.45 5.399c.896-1.069 1.908-1.72 2.75-2.005-.54-.471-1.411-.738-2.421-.767C8.31 2.583 6.327 3.061 4.7 4.41a8.148 8.148 0 00-1.976 2.414c-.455.836-.691 1.659-.697 1.678.122-1.445.704-2.994 1.248-4.055-.79.413-1.827 1.668-2.41 3.042C.095 9.37-.2 11.608.14 13.989c.966 5.668 5.9 9.982 11.843 9.982C18.62 23.971 24 18.591 24 11.956a11.93 11.93 0 00-3.548-8.511z"></path></svg>Firefox</a></div></details></div><p class="mobile-install-note">Browser extension available on desktop.<!-- --> <a href="/extension">Learn more about the extension</a></p></div></section><section><div class="section-h"><h2>Example report</h2></div><p class="demo-note">The report below is a live example. Paste any public repo URL above to analyze yours.</p><div class="runner"><div class="demo-report-head"><span class="chart-tag">sample</span><strong>Example report</strong></div><div class="runner-head"><div class="left"><strong class="runner-repo">react<!-- -->/<!-- -->react</strong><a class="runner-github-link" href="https://github.com/react/react" target="_blank" rel="noreferrer" aria-label="Open react/react on GitHub"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></div><div class="row-flex"><span class="runner-meta">v19.3.0<!-- --> · <!-- -->1d34f91<!-- --> ·<!-- --> <time dateTime="2026-10-01T08:33:09.575650816Z">Oct 1, 2026, 8:33 AM</time></span></div></div><div class="progress "><i style="transform:scaleX(1)"></i></div><span class="visually-hidden" aria-live="polite">Served from commit-level cache.</span><div class="summary"><div class="cell accent"><div class="lbl">Code</div><div class="val" title="364,361">364.4K</div></div><div class="cell "><div class="lbl">Files</div><div class="val" title="2,133">2,133</div></div><div class="cell "><div class="lbl">Lines</div><div class="val" title="459,809">459.8K</div></div><div class="cell "><div class="lbl">Comments</div><div class="val" title="59,105">59,105</div></div><div class="cell "><div class="lbl">Blanks</div><div class="val" title="36,343">36,343</div></div></div><div class="charts-section"><div class="mobile-code-summary"><span>JavaScript</span><strong>231,461<!-- --> <!-- -->code</strong><em>63.5%</em></div><div class="charts-toolbar"><span class="demo-scope-note">top 10 of 11 languages</span><button type="button" class="full-stats-toggle copybtn" aria-expanded="false">Full statistics</button></div><div class="charts-body"><div class="donut-panel"><div class="donut-wrap" role="img" aria-label="Languages"><svg viewBox="-1 -1 2 2"><path d="M 0 0 L 6.123233995736766e-17 -1 A 1 1 0 1 1 -0.7511566110670709 0.6601240380793849 Z" fill="#F1E05A"></path><path d="M 0 0 L -0.7511566110670709 0.6601240380793849 A 1 1 0 0 1 -0.9283437998474064 -0.3717227317300876 Z" fill="#CE422B"></path><path d="M 0 0 L -0.9283437998474064 -0.3717227317300876 A 1 1 0 0 1 -0.15641700712488088 -0.9876911054991308 Z" fill="#3178C6"></path><path d="M 0 0 L -0.15641700712488088 -0.9876911054991308 A 1 1 0 0 1 -0.09609247269511911 -0.9953724110559513 Z" fill="#6a6a6a"></path><path d="M 0 0 L -0.09609247269511911 -0.9953724110559513 A 1 1 0 0 1 -0.039617250891423934 -0.9992149285473101 Z" fill="#7a59ad"></path><path d="M 0 0 L -0.039617250891423934 -0.9992149285473101 A 1 1 0 0 1 -1.8369701987210297e-16 -1 Z" fill="var(--fg-mute)"></path><circle r="0.58" fill="var(--bg-2)"></circle></svg><div class="donut-center" title="364,361 total code lines"><span class="mute">code</span><strong>364.4K</strong></div></div><ul class="visually-hidden"><li>JavaScript<!-- -->: <!-- -->63.5%</li><li>Rust<!-- -->: <!-- -->17.5%</li><li>TypeScript<!-- -->: <!-- -->16.4%</li><li>JSON<!-- -->: <!-- -->1%</li><li>CSS<!-- -->: <!-- -->0.9%</li><li>Other<!-- -->: <!-- -->0.6%</li></ul></div><div class="table-wrap compact "><table class="report"><caption class="visually-hidden">Source line counts by language for react/react</caption><thead><tr><th class="lang" scope="col"><button type="button" class="sort-btn">Language<!-- --> <span class="arr" aria-hidden="true"></span></button></th><th scope="col"><button type="button" class="sort-btn">files<!-- --> <span class="arr" aria-hidden="true"></span></button></th><th scope="col"><button type="button" class="sort-btn">lines<!-- --> <span class="arr" aria-hidden="true"></span></button></th><th scope="col" aria-sort="descending"><button type="button" class="sort-btn">code<!-- --> <span class="arr" aria-hidden="true">v</span></button></th><th scope="col"><button type="button" class="sort-btn">comments<!-- --> <span class="arr" aria-hidden="true"></span></button></th><th scope="col"><button type="button" class="sort-btn">blanks<!-- --> <span class="arr" aria-hidden="true"></span></button></th></tr></thead><tbody><tr class="lang-row   " title="78.8% code · 13.1% comments · 8.1% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#F1E05A"></span>JavaScript<i class="row-share" style="width:63.52518518721817%;background:#F1E05A" aria-hidden="true"></i></td><td>
183<span>1,477</span></td><td><span>293,727</span></td><td><span>231,461</span><small class="mobile-code-share">63.5%</small></td><td><span>38,456</span></td><td><span>23,810</span></td></tr><tr class="lang-row expandable  " title="88% code · 5.2% comments · 6.8% blanks"><td class="lang"><button class="expand" type="button" aria-label="Expand Rust file details" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><span class="swatch" style="color:#CE422B"></span>Rust<i class="row-share" style="width:17.53645423083151%;background:#CE422B" aria-hidden="true"></i></td><td><span>117</span></td><td><span>72,601</span></td><td><span>63,896</span><small class="mobile-code-share">17.5%</small></td><td><span>3,775</span></td><td><span>4,930</span></td></tr><tr class="lang-row   " title="80.5% code · 13.7% comments · 5.8% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#3178C6"></span>TypeScript<i class="row-share" style="width:16.438641896361027%;background:#3178C6" aria-hidden="true"></i></td><td><span>219</span></td><td><span>74,391</span></td><td><span>59,896</span><small class="mobile-code-share">16.4%</small></td><td><span>10,169</span></td><td><span>4,326</span></td></tr><tr class="lang-row   " title="99.8% code · 0% comments · 0.2% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#6a6a6a"></span>JSON<i class="row-share" style="width:0.9679960259193493%;background:#6a6a6a" aria-hidden="true"></i></td><td><span>86</span></td><td><span>3,535</span></td><td><span>3,527</span><small class="mobile-code-share">1%</small></td><td><span>0</span></td><td><span>8</span></td></tr><tr class="lang-row   " title="85.8% code · 1.6% comments · 12.6% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#7a59ad"></span>CSS<i class="row-share" style="width:0.9010294735166497%;background:#7a59ad" aria-hidden="true"></i></td><td><span>88</span></td><td><span>3,828</span></td><td><span>3,283</span><small class="mobile-code-share">0.9%</small></td><td><span>61</span></td><td><span>484</span></td></tr><tr class="lang-row   " title="83.8% code · 9.6% comments · 6.6% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#79c0ff"></span>TSX<i class="row-share" style="width:0.36584596046228873%;background:#79c0ff" aria-hidden="true"></i></td><td><span>15</span></td><td><span>1,591</span></td><td><span>1,333</span><small class="mobile-code-share">0.4%</small></td><td><span>153</span></td><td><span>105</span></td></tr><tr class="lang-row expandable  " title="95% code · 2.1% comments · 3% blanks"><td class="lang"><button class="expand" type="button" aria-label="Expand HTML file details" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><span class="swatch" style="color:#E34C26"></span>HTML<i class="row-share" style="width:0.11417248278493032%;background:#E34C26" aria-hidden="true"></i></td><td><span>23</span></td><td><span>438</span></td><td><span>416</span><small class="mobile-code-share">0.1%</small></td><td><span>9</span></td><td><span>13</span></td></tr><tr class="lang-row   " title="59.5% code · 22.2% comments · 18.3% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#89E051"></span>Shell<i class="row-share" style="width:0.08672717442316823%;background:#89E051" aria-hidden="true"></i></td><td><span>19</span></td><td><span>531</span></td><td><span>316</span><small class="mobile-code-share">&lt;0.1%</small></td><td><span>118</span></td><td>
183<span>97</span></td></tr><tr class="lang-row   " title="90.3% code · 1.6% comments · 8.1% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#b04a25"></span>TOML<i class="row-share" style="width:0.06120303764672948%;background:#b04a25" aria-hidden="true"></i></td><td><span>14</span></td><td><span>247</span></td><td><span>223</span><small class="mobile-code-share">&lt;0.1%</small></td><td><span>4</span></td><td><span>20</span></td></tr><tr class="lang-row   " title="100% code · 0% comments · 0% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#3fb950"></span>SVG<i class="row-share" style="width:0.0027445308361762097%;background:#3fb950" aria-hidden="true"></i></td><td><span>7</span></td><td><span>10</span></td><td><span>10</span><small class="mobile-code-share">&lt;0.1%</small></td><td><span>0</span></td><td><span>0</span></td></tr><tr class="lang-row   " title="0% code · 71.4% comments · 28.6% blanks"><td class="lang"><span class="expand-spacer"></span><span class="swatch" style="color:#79c0ff"></span>Other (1 more)<i class="row-share" style="width:0%;background:#79c0ff" aria-hidden="true"></i></td><td><span>68</span></td><td><span>8,910</span></td><td><span>0</span><small class="mobile-code-share">0%</small></td><td><span>6,360</span></td><td><span>2,550</span></td></tr><tr class="totals"><td class="lang">Total</td><td><span>2,133</span></td><td><span>459,809</span></td><td><span>364,361</span></td><td><span>59,105</span></td><td><span>36,343</span></td></tr></tbody></table></div></div></div></div></section><section id="extension" class="extension-promo"><div class="section-h"><h2>Browser Extension</h2><span class="sub">GitHub SLOC &amp; code statistics in the repo sidebar.</span></div><!--$--><div class="extension-panel extension-panel-compact"><div class="extension-preview"><picture><source media="(prefers-color-scheme: dark)" srcSet="/octocounts-dark-card-320.webp 320w, /octocounts-dark-card-480.webp 480w, /octocounts-dark-card-768.webp 768w" sizes="(max-width: 980px) 100vw, 240px"/><source media="(prefers-color-scheme: light)" srcSet="/octocounts-light-card-320.webp 320w, /octocounts-light-card-480.webp 480w, /octocounts-light-card-768.webp 768w" sizes="(max-width: 980px) 100vw, 240px"/><img src="/octocounts-light-card-480.webp" alt="OctoCounts browser extension showing SLOC results on a GitHub repository" loading="lazy" width="480" height="300"/></picture></div><div class="extension-copy"><div class="terminal-label">browser-extension@octocounts</div><h3>OctoCounts – GitHub SLOC &amp; Code Statistics</h3><p>Open a GitHub repository and OctoCounts adds a compact SLOC card to the repo sidebar. Click the card for the full panel with totals, language breakdown, and cached stats.</p><ul class="extension-features"><li>Repo sidebar card</li><li>Language table</li><li>Local cache</li></ul><div class="extension-actions"><a class="copybtn" href="/extension">Learn more about the extension</a><a class="btn install-btn primary-install" href="https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj" target="_blank" rel="noreferrer"><svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z"></path></svg>Install from Chrome Web Store</a><p class="mobile-install-note">Browser extension available on desktop.<!-- --> <a href="/extension">Learn more about the extension</a></p><details class="extension-other-stores"><summary>Other browsers</summary><div><a class="copybtn install-btn secondary-install" href="https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim" target="_blank" rel="noreferrer"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M21.86 13.34c0-5.2-4.16-9.42-9.3-9.42-4.63 0-8.48 3.43-9.18 7.91.96-1.72 2.91-3.3 5.87-3.3 3.54 0 5.85 2.05 5.85 4.8H7.56c.24 2.65 2.43 4.42 5.47 4.42 2.12 0 4.05-.73 5.54-2.13-.89 2.88-3.57 4.46-6.85 4.46C5.64 20.08 1 16.12 1 10.45 1 4.68 5.77 0 11.65 0 18.38 0 23 4.77 23 11.35c0 .69-.06 1.35-.18 1.99h-.96Z"></path></svg>Install from Microsoft Edge Add-ons</a><a class="copybtn install-btn secondary-install" href="https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/" target="_blank" rel="noreferrer"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.452 3.445a11.002 11.002 0 00-2.482-1.908C16.944.997 15.098.093 12.477.032c-.734-.017-1.457.03-2.174.144-.72.114-1.398.292-2.118.56-1.017.377-1.996.975-2.574 1.554.583-.349 1.476-.733 2.55-.992a10.083 10.083 0 013.729-.167c2.341.34 4.178 1.381 5.48 2.625a8.066 8.066 0 011.298 1.587c1.468 2.382 
1831.33 5.376.184 7.142-.85 1.312-2.67 2.544-4.37 2.53-.583-.023-1.438-.152-2.25-.566-2.629-1.343-3.021-4.688-1.118-6.306-.632-.136-1.82.13-2.646 1.363-.742 1.107-.7 2.816-.242 4.028a6.473 6.473 0 01-.59-1.895 7.695 7.695 0 01.416-3.845A8.212 8.212 0 019.45 5.399c.896-1.069 1.908-1.72 2.75-2.005-.54-.471-1.411-.738-2.421-.767C8.31 2.583 6.327 3.061 4.7 4.41a8.148 8.148 0 00-1.976 2.414c-.455.836-.691 1.659-.697 1.678.122-1.445.704-2.994 1.248-4.055-.79.413-1.827 1.668-2.41 3.042C.095 9.37-.2 11.608.14 13.989c.966 5.668 5.9 9.982 11.843 9.982C18.62 23.971 24 18.591 24 11.956a11.93 11.93 0 00-3.548-8.511z"></path></svg>Download for Firefox (GitHub release)</a></div></details></div></div></div><!--/$--></section><div class="deferred-slot" style="--deferred-estimate:160px"><section class="report-index" aria-label="Public OctoCounts report index"><div class="report-index-head"><p>public report activity, aggregate only</p></div><nav class="report-index-grid" aria-label="Explore public reports"><a href="/stats" class="report-index-link primary"><strong>Stats</strong><em>aggregate usage</em></a><a href="/recent" class="report-index-link"><strong>Recent</strong><em>fresh reports</em></a><a href="/popular" class="report-index-link"><strong>Popular</strong><em>most viewed</em></a><a href="/trending" class="report-index-link"><strong>Trending</strong><em>GitHub daily</em></a><a href="/hall-of-monoliths" class="report-index-link"><strong>Hall</strong><em>largest repos</em></a></nav></section></div><section id="tools"><div class="section-h"><h2>Tools</h2><span class="sub">every card opens the real tool, ready to run</span></div><div class="deferred-slot" style="--deferred-estimate:480px"><div class="developer-tools tools-grid"><a class="developer-tool" href="/badges"><span class="chart-tag">Badges</span><p>Live README badges that link back to a permanent report.</p><code>[![SLOC](https://api.octocounts.com/badge/:owner/:repo)](...)</code></a><a class="developer-tool" href="/compare"><span class="chart-tag">Compare</span><p>Two repositories side by side: totals, language mix, deltas.</p><code>open /compare?left=…&amp;right=…</code></a><a class="developer-tool" href="/diff"><span class="chart-tag">Ref diff</span><p>One repository across two refs: growth between releases or branches.</p><code>open /diff?repo=…&amp;base=v1.0&amp;head=v1.1</code></a><a class="developer-tool" href="/docs/api"><span class="chart-tag">API</span><p>Analyze, jobs, reports, badge, SEO, and stats endpoints.</p><code>GET https://api.octocounts.com/api/stats</code></a><a class="developer-tool" href="https://github.com/huanglizhuo/OctoCounts/tree/main/cli"><span class="chart-tag">CLI</span><p>Run OctoCounts from a terminal or CI script; text or JSON output.</p><code>npx octocounts https://github.com/owner/repo --json</code></a><a class="developer-tool" href="https://github.com/huanglizhuo/OctoCounts/tree/main/action"><span class="chart-tag">GitHub Action</span><p>Comment SLOC changes on pull requests, inside review workflows.</p><code>uses: huanglizhuo/OctoCounts/action@main</code></a><a class="developer-tool" href="https://github.com/huanglizhuo/OctoCounts/tree/main/mcp"><span class="chart-tag">MCP server</span><p>SLOC reports for agent workflows and developer assistants.</p><code>npx octocounts-mcp</code></a></div></div></section><section class="section-compact"><div class="section-h"><h2>Use Cases</h2><span class="sub">common reasons developers count lines</span></div><div class="deferred-slot" style="--deferred-estimate:220px"><div class="how"><div class="step"><h3>Evaluate a dependency</h3><p>Before adopting a new open source library, check its actual size, not just file count. A 50-file repo might be 20k lines of dense C++ or 500 lines of glue code. SLOC gives you the real picture before you commit to a dependency.</p></div><div class="step"><h3>Estimate project scope</h3><p>Clients and stakeholders ask how big a codebase is. SLOC gives you a solid number before a review or audit: 12k lines across 8 languages, 89% code, 4% comments.</p></div><div class="step"><h3>Compare forks or alternatives</h3><p>Paste two repos and compare language breakdowns side by side. See how much a fork diverged, or how different two implementations of the same spec really are.</p></div></div></div></section><section class="section-compact"><div class="section-h"><h2>How It Works</h2><span class="sub">archive in, tokei report out</span></div><div class="deferred-slot" style="--deferred-estimate:520px"><div class="pipeline" aria-hidden="true"><span class="pipe-node ">github url</span><span class="pipe-link"><i></i></span><span class="pipe-node ">tarball</span><span class="pipe-link"><i></i></span><span class="pipe-node ">tokei</span><span class="pipe-link"><i></i></span><span class="pipe-node accent">
183cached report</span></div><div class="how"><div class="step"><span class="n">01</span><h3>Resolve</h3><p>OctoCounts validates the public GitHub URL and resolves the requested branch, tag, or commit SHA to a pinned commit hash via the GitHub API. Pinning to a commit means the analysis is deterministic: the same URL and ref always produce the same count, and the cache key is stable regardless of branch movement.</p><div class="codeline">GET <span class="c">/repos/:owner/:repo</span></div></div><div class="step"><span class="n">02</span><h3>Count</h3><p>The Rust backend downloads a compressed archive, not a full git clone. It skips generated folders like node_modules, vendor, and .git, then tokei counts every source file in a background worker queue.</p><div class="codeline">tokei <span class="c">--output json</span></div></div><div class="step"><span class="n">03</span><h3>Cache</h3><p>Reports are stored by owner, repo, commit SHA, and tokei version. When you re-analyze the same commit, the cache is hit immediately, with no re-download and no re-count. Re-run forces a fresh analysis and updates the cache. The browser extension also caches results locally for instant offline viewing.</p><div class="codeline">cache <span class="c">commit + version</span></div></div></div></div></section><section class="section-compact home-faq" id="faq">
183<script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"https://octocounts.com/#faq","mainEntity":[{"@type":"Question","name":"What is SLOC?","acceptedAnswer":{"@type":"Answer","text":"SLOC stands for Source Lines of Code. It is a software metric used to measure the size of a program by counting the lines in its source code. Unlike raw line count, SLOC distinguishes between code lines (actual instructions the compiler or interpreter processes), comment lines (documentation and explanations), and blank lines (whitespace). This breakdown matters because a 10,000-line file that is 40% comments tells a different story than one that is 95% code.\n\nDevelopers use SLOC to estimate project complexity, compare codebases when evaluating dependencies, scope billing and audit work, and communicate repository size to stakeholders who may not read code. OctoCounts reports SLOC at two levels: per programming language and as aggregate totals across the entire repository. The underlying counter is tokei, an open-source line counter written in Rust that processes files in parallel."}},{"@type":"Question","name":"Why use OctoCounts instead of cloning and running tokei locally?","acceptedA
183nswer":{"@type":"Answer","text":"OctoCounts downloads a compressed archive tarball rather than a full git clone with history. A git clone transfers every commit object, tree object, and blob in the repository's history; for a long-lived project that can mean hundreds of megabytes or gigabytes of data even if the current source tree is small. OctoCounts fetches only the archive of the working tree at the requested ref, so the transfer covers the current source tree instead of the repository's entire history.\n\nAdditionally, there is nothing to install. No git, no Rust toolchain, no tokei binary. Just paste a GitHub URL into the web app or install the browser extension once. Results are cached by commit SHA and tokei version, so any repeated analysis of the same commit returns instantly with zero re-download and zero re-processing. This makes OctoCounts especially useful for quickly evaluating dependencies or unfamiliar repositories without setting up a local environment."}},{"@type":"Question","name":"Does OctoCounts have a browser extension?","acceptedA
183nswer":{"@type":"Answer","text":"Yes. OctoCounts has browser extensions for Chrome, Edge, and Firefox, all named OctoCounts – GitHub SLOC & Code Statistics. Install from the Chrome Web Store, Microsoft Edge Add-ons, or Firefox Add-ons to add a compact SLOC card directly to GitHub repository sidebars. The card appears automatically on any public repository page and shows the total line count and analysis status. Clicking the card opens the full panel, which displays files, total lines, code lines, comment lines, and blank lines per language, the same breakdown as the web app.\n\nThe extension includes a local cache so results load instantly on repeat visits to the same repository and ref. You can configure the auto-analyze setting to fetch counts immediately on page load, or trigger analysis manually. The placement setting controls where the card appears in the GitHub sidebar. No GitHub account or API token is required. The extension source code is publicly available on GitHub."}},{"@type":"Question","name":"Is OctoCounts free to use?","acceptedA
183nswer":{"@type":"Answer","text":"Yes. OctoCounts is completely free to use for public GitHub repositories. There is no account required, no API key, no sign-up, and no rate limit that is publicly documented. Both the web app and the browser extensions are free with no premium tier. The backend is open source, written in Rust using the Axum framework, and the frontend is written in React with TypeScript. If you prefer, you can self-host the entire stack; the source code is available on GitHub at github.com/huanglizhuo/OctoCounts.\n\nOctoCounts intentionally analyzes public repositories only. It does not request GitHub account access, does not support private repositories, and does not accept source-code uploads. OctoCounts has no advertising and collects no personal data."}},{"@type":"Question","name":"What programming languages does OctoCounts support?","acceptedAnswer":{"@type":"Answer","text":"OctoCounts uses tokei for language detection, which supports over 200 programming languages and file types. Languages covered include Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, Swift, Kotlin, PHP, Scala, Haskell, Elixir, Erlang, Clojure, F#, Lua, R, Julia, Dart, Perl, Shell, Bash, PowerShell, HTML, CSS, SCSS, SQL, GraphQL, Dockerfile, YAML, JSON, TOML, XML, Markdown, and many more.\n\ntokei detects languages primarily by file extension, with fallback to shebang lines and content-based detection for ambiguous files. It handles multi-language files and supports configuration to exclude specific directories such as node_modules, vendor, or build output folders. OctoCounts automatically skips heavy generated folders before passing the archive to tokei, which means the SLOC count reflects actual human-written source code rather than auto-generated files that would inflate the numbers."}},{"@type":"Question","name":"Can I export the source line count results?","acceptedA
183nswer":{"@type":"Answer","text":"Yes. OctoCounts supports three export formats available from the action buttons below the analysis results. Plain text copies a formatted table to your clipboard, showing language name, file count, total lines, code lines, comment lines, and blank lines in a column-aligned layout suitable for pasting into README files, GitHub issues, or documentation. JSON downloads the full structured report including per-language stats and aggregate totals, formatted for use in scripts, CI pipelines, or other tools that consume JSON.\n\nPNG downloads a 1200 × 630 image card showing the language breakdown, suitable for sharing on Twitter, LinkedIn, GitHub repository READMEs, or portfolio pages. The PNG card uses the same dark and light color palette as the web app and includes the repository name, total line count, and a language breakdown. All three formats are generated client-side from the analysis data already loaded in your browser, so no additional server request is needed."}},{"@type":"Question","name":"Does OctoCounts support private repositories?","acceptedA
183nswer":{"@type":"Answer","text":"OctoCounts supports public GitHub repositories only. It does not request GitHub account access, does not support private repositories, and does not accept source-code uploads. If you need to count lines of code in a private repository, run tokei locally. Download tokei from github.com/XAMPPRocky/tokei, clone your repository, and run tokei in the repository root. tokei is free, open source, and produces the same output format that OctoCounts uses."}}]}</script>
183<div class="section-h"><h2>Frequently Asked Questions</h2><span class="sub">about SLOC, OctoCounts, and exports</span></div><div class="faq-list"><details class="faq-item"><summary><h3>What is SLOC?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>SLOC stands for Source Lines of Code. It is a software metric used to measure the size of a program by counting the lines in its source code. Unlike raw line count, SLOC distinguishes between code lines (actual instructions the compiler or interpreter processes), comment lines (documentation and explanations), and blank lines (whitespace). This breakdown matters because a 10,000-line file that is 40% comments tells a different story than one that is 95% code.</p><p>Developers use SLOC to estimate project complexity, compare codebases when evaluating dependencies, scope billing and audit work, and communicate repository size to stakeholders who may not read code. OctoCounts reports SLOC at two levels: per programming language and as aggregate totals across the entire repository. The underlying counter is tokei, an open-source line counter written in Rust that processes files in parallel.</p></details><details class="faq-item"><summary><h3>Why use OctoCounts instead of cloning and running tokei locally?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>OctoCounts downloads a compressed archive tarball rather than a full git clone with history. A git clone transfers every commit object, tree object, and blob in the repository&#x27;s history; for a long-lived project that can mean hundreds of megabytes or gigabytes of data even if the current source tree is small. OctoCounts fetches only the archive of the working tree at the requested ref, so the transfer covers the current source tree instead of the repository&#x27;s entire history.</p><p>Additionally, there is nothing to install. No git, no Rust toolchain, no tokei binary. Just paste a GitHub URL into the web app or install the browser extension once. Results are cached by commit SHA and tokei version, so any repeated analysis of the same commit returns instantly with zero re-download and zero re-processing. This makes OctoCounts especially useful for quickly evaluating dependencies or unfamiliar repositories without setting up a local environment.</p></details><details class="faq-item"><summary><h3>Does OctoCounts have a browser extension?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>Yes. OctoCounts has browser extensions for Chrome, Edge, and Firefox, all named OctoCounts – GitHub SLOC &amp; Code Statistics. Install from the Chrome Web Store, Microsoft Edge Add-ons, or Firefox Add-ons to add a compact SLOC card directly to GitHub repository sidebars. The card appears automatically on any public repository page and shows the total line count and analysis status. Clicking the card opens the full panel, which displays files, total lines, code lines, comment lines, and blank lines per language, the same breakdown as the web app.</p><p>The extension includes a local cache so results load instantly on repeat visits to the same repository and ref. You can configure the auto-analyze setting to fetch counts immediately on page load, or trigger analysis manually. The placement setting controls where the card appears in the GitHub sidebar. No GitHub account or API token is required. The extension source code is publicly available on GitHub.</p></details><details class="faq-item"><summary><h3>Is OctoCounts free to use?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>Yes. OctoCounts is completely free to use for public GitHub repositories. There is no account required, no API key, no sign-up, and no rate limit that is publicly documented. Both the web app and the browser extensions are free with no premium tier. The backend is open source, written in Rust using the Axum framework, and the frontend is written in React with TypeScript. If you prefer, you can self-host the entire stack; the source code is available on GitHub at github.com/huanglizhuo/OctoCounts.</p><p>OctoCounts intentionally analyzes public repositories only. It does not request GitHub account access, does not support private repositories, and does not accept source-code uploads. OctoCounts has no advertising and collects no personal data.</p></details>
183<details class="faq-item"><summary><h3>What programming languages does OctoCounts support?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>OctoCounts uses tokei for language detection, which supports over 200 programming languages and file types. Languages covered include Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, Swift, Kotlin, PHP, Scala, Haskell, Elixir, Erlang, Clojure, F#, Lua, R, Julia, Dart, Perl, Shell, Bash, PowerShell, HTML, CSS, SCSS, SQL, GraphQL, Dockerfile, YAML, JSON, TOML, XML, Markdown, and many more.</p><p>tokei detects languages primarily by file extension, with fallback to shebang lines and content-based detection for ambiguous files. It handles multi-language files and supports configuration to exclude specific directories such as node_modules, vendor, or build output folders. OctoCounts automatically skips heavy generated folders before passing the archive to tokei, which means the SLOC count reflects actual human-written source code rather than auto-generated files that would inflate the numbers.</p></details><details class="faq-item"><summary><h3>Can I export the source line count results?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>Yes. OctoCounts supports three export formats available from the action buttons below the analysis results. Plain text copies a formatted table to your clipboard, showing language name, file count, total lines, code lines, comment lines, and blank lines in a column-aligned layout suitable for pasting into README files, GitHub issues, or documentation. JSON downloads the full structured report including per-language stats and aggregate totals, formatted for use in scripts, CI pipelines, or other tools that consume JSON.</p><p>PNG downloads a 1200 × 630 image card showing the language breakdown, suitable for sharing on Twitter, LinkedIn, GitHub repository READMEs, or portfolio pages. The PNG card uses the same dark and light color palette as the web app and includes the repository name, total line count, and a language breakdown. All three formats are generated client-side from the analysis data already loaded in your browser, so no additional server request is needed.</p></details><details class="faq-item"><summary><h3>Does OctoCounts support private repositories?</h3><span class="faq-marker" aria-hidden="true"></span></summary><p>OctoCounts supports public GitHub repositories only. It does not request GitHub account access, does not support private repositories, and does not accept source-code uploads. If you need to count lines of code in a private repository, run tokei locally. Download tokei from github.com/XAMPPRocky/tokei, clone your repository, and run tokei in the repository root. tokei is free, open source, and produces the same output format that OctoCounts uses.</p></details></div></section><footer><div class="footer-meta"><span>OctoCounts // actual SLOC for public GitHub repos</span><p>Built by <a href="https://github.com/huanglizhuo" target="_blank" rel="noreferrer">huanglizhuo</a>, indie developer<!-- --> <!-- -->(c) 2026</p><p class="footer-freshness">Last updated<!-- -->: <time dateTime="2026-09-17">2026-09-17</time></p></div><nav class="footer-cols" aria-label="Footer"><div class="footer-col"><h2>Product</h2><ul><li><a href="/stats">Stats</a></li><li><a href="/popular">Popular</a></li><li><a href="/trending">Trending</a></li><li><a href="/badges">Badges</a></li><li><a href="/extension">Extension</a></li></ul></div><div class="footer-col"><h2>Docs</h2><ul><li><a href="/docs/api">API docs</a></li><li><a href="/docs/github-sloc-counter">SLOC guide</a></li><li><a href="/docs/faq">FAQ</a></li><li><a href="/docs/github-language-bar-alternative">Language bar alternative</a></li><li><a href="/docs/methodology">Methodology</a></li></ul></div><div class="footer-col"><h2>About</h2><ul><li><a href="/about">About</a></li><li><a href="/privacy">Privacy</a></li><li><a href="/contact">Contact</a></li><li><a href="https://github.com/huanglizhuo/OctoCounts" target="_blank" rel="noreferrer">GitHub</a></li></ul></div></nav></footer></main></div>
184    <!-- Cloudflare Pages Analytics -->
vendor: 99 bytes, line 184
184<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "
18471af94b0ca2c4711a817b0cb99d9eb5b
vendor: 13 bytes, line 184
184"}'></script>
184<!-- Cloudflare Pages Analytics -->
184<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"236ed5144ce44b0c9b780a2b74cdf95f","r":1,"spa":2}' crossorigin="anonymous"></script>
vendor: 1 bytes, line 184
184
185<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a43f9b8ecce1863e',t:'MTc5MDkwMTEyMg=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>
185</body>
186</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.