OctoCounts Methodology
OctoCounts counts public GitHub repository source trees at a pinned ref. It does not clone full git history, does not request account access, and does not analyze private repositories.
Counting Pipeline
- Validate: OctoCounts accepts public
github.comrepository URLs only. - Resolve: The requested branch, tag, or commit SHA is resolved to a pinned commit SHA.
- Download: The backend downloads the GitHub source archive for that exact ref.
- Extract: The archive is unpacked into a temporary workspace.
- Count: tokei detects languages and counts files, total lines, code lines, comments, and blank lines.
- Cache: The report is stored by repository, commit SHA, tokei version, and analysis options.
Cache Key
Reports are cached by repository provider, owner, repository name, commit SHA, tokei version, and active analysis options. Repeated requests for the same commit and options return the cached report instead of downloading and counting again.
Default Exclusions
OctoCounts skips heavy dependency and build folders by default so counts represent the source tree rather than installed dependencies or generated output.
.cache
.git
.next
build
dist
node_modules
target
vendor
Metrics
| Metric | Definition |
|---|---|
| Files | Files detected by tokei as source or supported text formats. |
| Total lines | Code lines + comment lines + blank lines. |
| Code lines | Language-parser-recognized source code lines. |
| Comments | Line and block comments recognized by language rules. |
| Blanks | Whitespace-only lines. |
| Languages | Detected programming languages and file types, sorted by code lines. |
Limitations
- OctoCounts analyzes public GitHub repositories only.
- Counts reflect the source archive at one commit, not the full repository history.
- Generated files, dependency folders, docs, tests, and ignored languages may be included or excluded depending on analysis options.
- Language classification follows tokei's rules and supported file types.
- GitHub repositories that are empty, private, unavailable, or too large may fail analysis.
Recommended Citation
As of {date} (commit {sha}), {owner}/{repo} contains {total_lines} total lines: {code_lines} code, {comment_lines} comments, {blank_lines} blank, across {file_count} files in {language_count} languages. Counted with tokei via OctoCounts.
Every cached report page includes its own generated citation text. Prefer citing the canonical report URL, for example https://octocounts.com/github/torvalds/linux.