SuperAPI AI Directory

OctoCounts

OctoCounts is a tool for counting source lines of code (SLOC) in public GitHub repositories, usable without cloning the repository. It offers multiple usage methods, including a web app, browser extension, CLI, GitHub Action, and MCP server, and is powered by tokei under the hood. The GitHub sidebar only shows language percentages; OctoCounts supplements missing data such as file count, total lines, lines of code, comment lines, blank lines, and language count. The tool runs analysis by downloading the repository archive rather than cloning Git history, and caches results by repository, commit, tokei version, and analysis options. The default counting scope excludes directories containing documentation, tests, and generated files; users can explicitly enable inclusion of these contents in the web app or API. Reports can be exported as plain text, JSON, or shareable PNG cards, and support embedding live SLOC badges in READMEs.

Open website

About this tool

OctoCounts is a source lines of code (SLOC) statistics tool for public GitHub repositories, positioned as a supplement to the code line count view not provided by GitHub. The GitHub sidebar usually only displays language percentages, while OctoCounts gives specific numbers such as file count, total lines, lines of code, comment lines, blank lines, and language count.

Main capabilities:

  • Browser extension: adds a statistics card to GitHub repository pages, directly displaying files, total lines, code, comments, blank lines, and language count.
  • Web app: paste any public GitHub repository URL to analyze.
  • Supports any branch, tag, or commit SHA, and pins results to the exact commit, making caching meaningful.
  • Counts by downloading the GitHub archive tarball rather than cloning the repository, and does not download Git history.
  • Uses tokei to count files, lines, code, comments, and blank lines by language.
  • Caches reports by repository, commit, tokei version, and analysis options; matching runs can reuse saved results.
  • Queues analysis tasks to avoid concurrent requests overwhelming the server.
  • Reports can be exported as plain text, JSON, or shareable PNG cards.
  • Provides usage methods such as CLI, GitHub Action, and MCP server.
  • Supports embedding live SLOC badges in READMEs, and language-specific badges can be obtained via ?lang=<language>.

Default counting scope: All OctoCounts interfaces (web app, badges, browser extension, CLI, MCP server, and indexed public report pages) use the same scope by default: documentation, tests, and generated files are not counted in lines of code. Exclusion is directory-based; in addition to always-ignored build/VCS directories (such as node_modules, target, dist, build, vendor, etc.), the default scope also excludes directories containing documentation, tests, and generated files in the directory tree. This rule is a counting scope rather than a purity claim: files outside these directories are still counted, for example root README.md, JSON lock files, and Rust #[cfg(test)] modules inlined in source files. Users can explicitly include these contents in the web app analysis options or the API's includeDocs, includeTests, and includeGenerated switches; in this case, it will produce for the same repositoryProduce different measurement results and fix them as independently saved results. Each report page notes the statistical scope next to the title number, and the counting policy section explains the specific effective rules for that run.

Usage:

  • Web app: Paste a public GitHub repository URL for analysis.
  • Browser extension: After installation, view statistics directly on GitHub repository pages.
  • Badge: Embed a live SLOC badge in README, supporting a per-language parameter.
  • CLI, GitHub Action, and MCP server: The materials mention these usage methods, but do not provide specific installation commands or configuration steps.

Applicable scenarios: Quickly understand the scale of a public repository (e.g., 2k lines, 200k lines, or a large monorepo), view the lines of code directly on the GitHub page, display project scale badges in README, and integrate SLOC statistics into other workflows via API or MCP server.

Limitations and notes:

  • Only for public GitHub repositories.
  • Live repository links follow the latest cached public report; fixed result links are bound to the saved report and commit, but saved records are affected by cache retention policy and may expire or be replaced; long-term archiving should export JSON or text.
  • The default statistical scope excludes documentation, tests, and generated file directories, and may differ from the results of other statistical tools.
  • The materials do not provide specific charges, prices, platform support scope, installation commands, and detailed deployment steps; this information is not currently provided.