工具概览
OctoCounts 可在浏览器扩展侧边栏或 Web 应用中显示公共 GitHub 仓库的实际源代码行数:文件数、代码行、注释、空行以及按语言统计的总数。无需克隆。
定价
目录尚未确认完整价格档位,请到官网查看当前额度、限制及计费方式。
访问官网价格与限制可能变化,请以官网为准,并确认币种、付款周期、最低席位数和用量上限。
应用场景
- 开发者使用 OctoCounts 在采用某个依赖项之前评估其真实规模。
- 开发者使用 OctoCounts 为客户、评审或审计估算项目范围。
- 开发者使用 OctoCounts 并排比较分支或替代实现。
- 开发者使用 OctoCounts 快速估算陌生开源仓库的规模。
- 开发者使用 OctoCounts 比较依赖项、分支、替代项目、分支线、标签或提交。
- 开发者使用 OctoCounts 为 README 添加实时 SLOC 徽章。
- 开发者使用 OctoCounts 将语言统计导出为文本、JSON 或社交分享图片。
- 团队使用 OctoCounts 的 API 在内部工具或 CI 仪表板中进行公共仓库规模检查。
功能特性
AI 助手
自然语言界面
工作流自动化
用户评论
还没有评论,来分享你的使用体验吧
常见问题
What is SLOC?
SLOC stands for Source Lines of Code, 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, comment lines, and blank lines. OctoCounts reports SLOC at two levels: per programming language and as aggregate totals across the entire repository, using the open-source counter tokei.
Why use OctoCounts instead of cloning and running tokei locally?
OctoCounts downloads a compressed archive tarball rather than a full git clone with history, so the transfer covers the current source tree instead of the repository's entire history. Nothing needs to be installed — no git, no Rust toolchain, no tokei binary. Results are cached by commit SHA and tokei version, so repeated analysis of the same commit returns instantly.
Does OctoCounts have a browser extension?
Yes. OctoCounts has browser extensions for Chrome, Edge, and Firefox, all named OctoCounts – GitHub SLOC & Code Statistics. They add a compact SLOC card to GitHub repository sidebars showing total line count and analysis status; clicking the card opens the full panel with files, total lines, code lines, comment lines, and blank lines per language. The extension includes a local cache, and no GitHub account or API token is required.
Is OctoCounts free to use?
Yes. OctoCounts is completely free to use for public GitHub repositories, with no account, API key, sign-up, or publicly documented rate limit. Both the web app and browser extensions are free with no premium tier. The backend is open source in Rust using Axum, the frontend is React with TypeScript, and the entire stack can be self-hosted.
What programming languages does OctoCounts support?
OctoCounts uses tokei for language detection, which supports over 200 programming languages and file types, including Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, Swift, Kotlin, PHP, and many more. tokei detects languages primarily by file extension, with fallback to shebang lines and content-based detection. OctoCounts automatically skips heavy generated folders before passing the archive to tokei.
Can I export the source line count results?
Yes. OctoCounts supports three export formats: plain text copies a formatted table to the clipboard, JSON downloads the full structured report, and PNG downloads a 1200 × 630 image card showing the language breakdown. All three formats are generated client-side from the analysis data already loaded in the browser.
Does OctoCounts support private repositories?
No. 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. For private repositories, the site recommends running tokei locally.
Do I need an API key or account to use the OctoCounts API?
No. The OctoCounts API requires no GitHub account access, no API token, and no sign-up. It analyzes public github.com repositories only, does not support private repositories, and does not accept source-code uploads.
How do I analyze a public GitHub repository?
POST to https://api.octocounts.com/api/analyze with a JSON body containing repoUrl and optionally refName, forceRefresh, source, and analysis options. refName may be a branch, tag, or commit SHA; if omitted, OctoCounts uses the repository default branch.
How do I check the status of an analysis job?
Poll GET https://api.octocounts.com/api/jobs/:jobId. Jobs return queued, running, completed, or failed, and completed jobs include a reportId that you pass to the report endpoint.