工具概覽
OctoCounts 可在瀏覽器擴充套件側邊欄或 Web 應用中顯示公共 GitHub 倉庫的實際原始碼行數:檔案數、程式碼行、註釋、空行以及按語言統計的總數。無需克隆。
定價
目錄尚未確認完整價格方案,請至官網查看目前額度、限制及計費方式。
訪問官網價格與限制可能變動,請以官網為準,並確認幣別、付款週期、最低席位數和用量上限。
應用場景
- 開發者使用 OctoCounts 在採用某個依賴項之前評估其真實規模。
- 開發者使用 OctoCounts 為客戶、評審或審計估算專案範圍。
- 開發者使用 OctoCounts 並排比較分支或替代實現。
- 開發者使用 OctoCounts 快速估算陌生開源倉庫的規模。
- 開發者使用 OctoCounts 比較依賴項、分支、替代專案、分支線、標籤或提交。
- 開發者使用 OctoCounts 為 README 新增即時 SLOC 徽章。
- 開發者使用 OctoCounts 將語言統計匯出為文本、JSON 或社交分享圖片。
- 團隊使用 OctoCounts 的 API 在內部工具或 CI 儀表板中進行公共倉庫規模檢查。
功能特色
統計公開 GitHub 倉庫的原始碼行數
在瀏覽器擴充套件側邊欄檢視統計
通過網頁應用檢視統計
分別檢視檔案數與程式碼行數
區分註釋行和空白行
檢視各程式語言的統計結果
無需克隆倉庫即可檢視
使用者評論
還沒有評論,來分享你的使用體驗吧
常見問題
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.