Skip to main content
ClaudeWave

OctoCounts – the SLOC panel GitHub forgot

MCP ServersRegistry oficial14 estrellas2 forks● JavaScriptMITActualizado today
ClaudeWave Trust Score
95/100
✓ Verified
Passed
  • ✓Open-source license (MIT)
  • ✓Actively maintained (<30d)
  • ✓Clear description
  • ✓Topics declared
  • ✓Documented (README)
Last scanned: 10/2/2026
Install in Claude Code / Claude Desktop
Method: NPX · octocounts
Claude Code CLI
claude mcp add octocounts -- npx -y octocounts
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "octocounts": {
      "command": "npx",
      "args": ["-y", "octocounts"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

<p align="center">
  <img src="images/favicon.png" alt="OctoCounts logo" width="64">
</p>

# OctoCounts – GitHub SLOC Counter

> GitHub shows language bars. OctoCounts shows the actual line counts.

[![Available in the Chrome Web Store](https://img.shields.io/chrome-web-store/v/gkgjpjdnaklagijmekoolhcpebmoldbj?label=Chrome%20Web%20Store&logo=googlechrome&logoColor=white)](https://chromewebstore.google.com/detail/octocounts-%E2%80%94-github-sloc/gkgjpjdnaklagijmekoolhcpebmoldbj)
[![Available in Microsoft Edge Add-ons](https://img.shields.io/badge/Microsoft%20Edge-Add--ons-0C59A4?logo=microsoftedge&logoColor=white)](https://microsoftedge.microsoft.com/addons/detail/octocounts-%E2%80%93-github-sloc-/ehifednhpbpekkadndaipnngopbhpoim)
[![Available in Firefox Add-ons](https://img.shields.io/amo/v/octocounts-github-sloc?label=Firefox%20Add-ons&logo=firefox&logoColor=white)](https://addons.mozilla.org/en-US/firefox/addon/octocounts-github-sloc/)

[![OctoCounts](https://api.octocounts.com/badge/huanglizhuo/OctoCounts)](https://octocounts.com/github/huanglizhuo/OctoCounts)

GitHub's sidebar shows language percentages, but misses actual file and line counts. OctoCounts adds this missing SLOC (Source Lines of Code) view to public repos without cloning.

Install the extension for instant stats directly on GitHub, or use the web app for public GitHub repositories. It downloads the repo archive, runs [tokei](https://github.com/XAMPPRocky/tokei), and caches the results—delivering a breakdown faster than `git clone`.

## Use OctoCounts

| Surface | Use it for |
|---|---|
| [Web app](https://octocounts.com/) | Analyze any public GitHub repository and share a permanent report. |
| [Browser extension](extension/README.md) | Show SLOC directly inside GitHub's repository sidebar in Chrome, Edge, or Firefox. |
| [Public stats](https://octocounts.com/stats) | See aggregate report totals, largest repos, language coverage, and source breakdown. |
| [GitHub Action](action/README.md) | Comment SLOC changes on pull requests. |
| [CLI](cli/README.md) | Run `npx octocounts https://github.com/owner/repo --json`. |
| [MCP server](mcp/README.md) | Give agents and developer assistants access to SLOC reports. |
| [README badges](#badges) | Add a live SLOC badge that links to a permanent report page. |
| [Launch kit](https://octocounts.com/launch-kit) | Copy product descriptions, launch posts, links, screenshots, and badges. |
| [Research](https://octocounts.com/research) | Original research: a pilot study on how test/doc/generated file filtering affects SLOC counts. |

## Preview

<p align="center">
  <img src="images/preview.png" alt="OctoCounts extension preview">
</p>

## Why?

Sometimes you just want to know whether a repo is 2k lines, 200k lines, or a weekend-devouring monolith. GitHub already has the repo, the language stats, and the sidebar. OctoCounts fills in the missing numbers.

## What it does

- Adds a browser extension card to GitHub repo pages with files, total lines, code, comments, blanks, and language count
- Provides a web app where you can paste any public GitHub repo URL
- Resolves any branch, tag, or commit SHA — pins results to an exact commit so the cache is actually meaningful
- Downloads the GitHub archive tarball instead of cloning (much faster, no git history overhead)
- Counts files, lines, code, comments, and blanks per language via tokei
- Caches reports by `owner + repo + commit + tokei version` — repeat runs are instant
- Queues analysis jobs so concurrent requests don't bring the server to its knees
- Exports reports as plain text, JSON, or a shareable PNG card

## Stack

| Layer | Tech |
|---|---|
| Backend | Rust · Axum · Tokio · SQLx · Postgres · tokei |
| Frontend | React · TypeScript · Vite · TanStack Query |
| Infra | Cloudflare Pages (Pages Functions SSR) · GHCR image + sloc-infra dual VPS (VPS-A/VPS-B) + Cloudflare Tunnel · Postgres on VPS-B (Neon frozen snapshot as fallback) · Docker Compose (local dev only) |

## Badges

Drop a live SLOC badge into any README:

```markdown
<!-- Default branch — full SLOC summary -->
[![SLOC](https://api.octocounts.com/badge/:owner/:repo)](https://octocounts.com/github/:owner/:repo)

<!-- Specific branch -->
[![SLOC](https://api.octocounts.com/badge/:owner/:repo/branch/:branch)](https://octocounts.com/github/:owner/:repo/tree/:branch)

<!-- Specific tag (immutable, cached forever) -->
[![SLOC](https://api.octocounts.com/badge/:owner/:repo/tag/:tag)](https://octocounts.com/github/:owner/:repo/tree/:tag)

<!-- Specific commit SHA (immutable, cached forever) -->
[![SLOC](https://api.octocounts.com/badge/:owner/:repo/commit/:sha)](https://octocounts.com/github/:owner/:repo/commit/:sha)
```

Add `?lang=<language>` to any of the above to get a per-language badge instead:

```markdown
<!-- Lines of code for a single language -->
[![Rust](https://api.octocounts.com/badge/:owner/:repo?lang=rust)](https://octocounts.com/github/:owner/:repo)
[![Rust](https://api.octocounts.com/badge/:owner/:repo/branch/:branch?lang=rust)](https://octocounts.com/github/:owner/:repo/tree/:branch)
```

Language names are case-insensitive (`rust`, `Rust`, and `RUST` all work). If a language is not found in the report the badge shows `—`. While a fresh analysis is running the badge shows `···` — most badge CDNs will retry automatically.

| Cache behaviour | Header |
|---|---|
| Default branch / branch | `s-maxage=3600, stale-while-revalidate=86400` |
| Tag / commit | `max-age=31536000, immutable` |

## API

```
POST /api/analyze          { "repoUrl": "...", "refName": "main" }
GET  /api/jobs/:id
GET  /api/reports/:id
GET  /api/stats

GET  /badge/:owner/:repo
GET  /badge/:owner/:repo/branch/:branch
GET  /badge/:owner/:repo/tag/:tag
GET  /badge/:owner/:repo/commit/:sha
```

All badge routes accept an optional `?lang=<language>` query parameter that switches the response from the full SLOC summary badge to a per-language shields.io-style badge.


## Running it

See **[how-to-run-and-deploy.md](docs/how-to-run-and-deploy.md)** for local development setup, host-native instructions, GitHub token configuration, and production deployment.

## Growth report inventory

Popular public repositories are listed in [`data/popular-repos.txt`](data/popular-repos.txt). The scheduled workflow [`seed-popular-repos.yml`](.github/workflows/seed-popular-repos.yml) refreshes that curated inventory weekly.

[`refresh-github-trending.yml`](.github/workflows/refresh-github-trending.yml) discovers GitHub's daily Trending repositories, validates and publishes the current snapshot to `/trending`, and pre-generates their stable `/github/:owner/:repo` SLOC reports. Trending provenance stays separate from real `/popular` access counts; no date-stamped archive pages are generated.

## License

[MIT](LICENSE)
browser-extensionchrome-extensioncode-metricsdeveloper-toolsgithub-extensionsrustsloctokei

Lo que la gente pregunta sobre OctoCounts

¿Qué es huanglizhuo/OctoCounts?

+

huanglizhuo/OctoCounts es mcp servers para el ecosistema de Claude AI. OctoCounts – the SLOC panel GitHub forgot Tiene 14 estrellas en GitHub y su última actualización registrada es del 2026-10-02.

¿Cómo se instala OctoCounts?

+

Puedes instalar OctoCounts clonando el repositorio (https://github.com/huanglizhuo/OctoCounts) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar huanglizhuo/OctoCounts?

+

Nuestro agente de seguridad ha analizado huanglizhuo/OctoCounts y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene huanglizhuo/OctoCounts?

+

huanglizhuo/OctoCounts es mantenido por huanglizhuo. La última actividad registrada en GitHub es del 2026-10-02, con 2 issues abiertos.

¿Hay alternativas a OctoCounts?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega OctoCounts en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: huanglizhuo/OctoCounts
[![Featured on ClaudeWave](https://claudewave.com/api/badge/huanglizhuo-octocounts)](https://claudewave.com/repo/huanglizhuo-octocounts)
<a href="https://claudewave.com/repo/huanglizhuo-octocounts"><img src="https://claudewave.com/api/badge/huanglizhuo-octocounts" alt="Featured on ClaudeWave: huanglizhuo/OctoCounts" width="320" height="64" /></a>

Más MCP Servers

Alternativas a OctoCounts