gloc is a free, open source monitoring & observability project written in TypeScript and released under GPL-2.0. It has 653 GitHub stars, 46 forks and 10 open issues, and was last pushed 11 months ago. On this registry it ranks #249 of 271 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available.

What is gloc?

GLOC, short for GitHub Lines of Code Counter, is a free GPL-2.0-licensed TypeScript browser extension for Chrome, Opera, Firefox, and Edge that overlays approximate lines-of-code totals onto GitHub pages, aimed at developers and teams who want a quick size signal for a repository without cloning it or running a local counter.

What it is

GLOC, short for "GitHub Lines of Code Counter," overlays approximate lines-of-code totals onto GitHub pages. It is published for Chrome, Opera, Firefox, and Edge, and its first public version, 2.0.1, dates to 12 February 2017. It sits in the Infrastructure & Operations / Monitoring & Observability category of this registry under the topics chrome, code-counter, counter, github-extension, gloc, metrics, and sloc.

The concrete problem is that GitHub does not expose a total lines-of-code figure for a project. GLOC computes an approximation through the GitHub Statistics API and renders it directly in the interface, so no clone, no local counter, and no separate service are needed, and it works for both public and private repositories. Because the number is an approximation rather than a full scan, the README warns that glitches occur, including negative LOC values or unavailable data. Counting on the project detail page was deliberately switched off, on the stated grounds that it placed too much load on GitHub's services.

Key capabilities

  • Renders approximate lines-of-code totals inline on GitHub using the GitHub Statistics API, not a local clone.
  • Counts both public and private repositories.
  • Displays counts on pinned repos, the repositories tab, starred repositories, organization pages, search results, the trending page, and the explore page.
  • Omits the project detail page; that behaviour was disabled to limit load on GitHub.
  • Ships as extensions for Chrome, Opera, Firefox, and Edge, written in TypeScript under GPL-2.0.
  • Tracks issues at github.com/kas-elvirov/gloc and publishes a privacy policy at PRIVACY.md.

Who uses it and how

  • Developers browsing GitHub who want a rough size signal before cloning or reading a repository.
  • Engineers reviewing a profile, its pinned repos, repositories tab, or starred list to gauge a user's footprint.
  • Teams scanning organization pages, search results, trending, or explore to compare projects at a glance.
  • Users of private repositories, since counts are produced for private repos as well as public ones.

Getting started

Install from a browser add-on store: on Chrome, open More toolsExtensions, click Get more extensions, search for gloc, and click Add to Chrome. Equivalent listings exist for Opera, Firefox, and Edge.

How it compares

No comparable tool and no list of paid products is named in the facts supplied for this entry, so GLOC stands alone in this registry on those points.

When to use it — and when not to

There is nothing to operate: no database, storage, or SMTP service is involved, because the extension runs in the browser and reads GitHub's own statistics. Anyone who needs exact, reproducible line counts for billing, compliance, or build metrics should not rely on it, since the values are approximations from the GitHub Statistics API and the README documents glitches such as negative LOC or missing data. The README is also thin on building from source, and the project's last push was in November 2025 with 10 open issues.

project readme (upstream, from github) — read inline

Chrome Web Store Chrome Web Store Chrome Web Store


Browser extension GLOC ( Chrome, Opera, Firefox, Edge )

Chrome Opera Firefox EDGE

DISCLAIMER

Github does not have a function to view the total number of lines of code in the project but we can to compute an approximation of that data (LOC: Lines of Code) through the GitHub Statistics API. Some glitches may occur, such as negative loc or unavailable data for many reasons

History and origins

  • Gloc means - 'Github lines of code counter'
  • Initial version: 2.0.1 ( 2017, 12 february )
  • I made this extension in the Russian Army while was on duty. My fastest open-source ever )

Description

Works for public and private repos

Counts lines of code in:

Previosly was counting there but i decided to stop it because it's huge load on the services of GutHub (ethics etc.)

Screens

Promo Project page Many repos

Installation

  1. Go to More tools --> Extensions
  2. Scroll below and click Get more extensions
  3. Search gloc --> and click Add to Chrome

Quick links


credits Credits

Assets

Sponsors

Frequently asked questions

Is gloc free to use?

gloc is open source under the GPL-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does gloc do?

Browser extension: counts lines of code on GitHub

What is gloc written in?

gloc is primarily written in TypeScript. Its source is publicly available at https://github.com/kas-elvirov/gloc, and it has 653 GitHub stars.