macOS
brew install ohcountlocal Homebrew formula metadata
sudo port install ohcountMacPorts ports tree · textproc/ohcount/Portfile · ソース: api.github.com
brew
ohcount のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install ohcountlocal Homebrew formula metadata
sudo port install ohcountMacPorts ports tree · textproc/ohcount/Portfile · ソース: api.github.com
sudo apt install ohcountDebian stable package indexes · ohcount · ソース: deb.debian.org
sudo zypper install ohcountopenSUSE Tumbleweed package metadata · ohcount · ソース: download.opensuse.org
概要
Source code line counter
履歴
Ohcount is the Ohloh/Open Hub source-code line counter: a C and Ragel based analyzer with a command-line tool and language-detection library for counting code, comment, and blank lines across source trees.
The project traces back to Ohloh, the open-source project directory and analytics site later associated with Black Duck and Open Hub. Its README says it was originally developed at Ohloh and used to generate the reports at www.openhub.net, which makes it part of the early package-statistics infrastructure rather than just a standalone `wc`-style utility.
The original GitHub source repository was created on 2008-06-09, and the Black Duck fork used by package managers was created on 2010-10-27. The Black Duck repository kept the Ohloh identity in its description while moving the maintained packaging-facing project under the Black Duck Software organization.
Ohcount's most important adoption story is Open Hub itself: the tool was used to generate Open Hub's source-code reports, giving it a role in public open-source metrics. It also reached mainstream Unix packaging through Homebrew, Debian, Ubuntu, MacPorts, and openSUSE-style distributions, but Homebrew analytics generated on 2026-07-01 showed a small niche user base: 49 installs over 365 days.
The package stayed interesting to distributors because it is not a single-language counter. The README describes a detector for primary language family, a parser for line-by-line breakdowns, support for multiple languages in one file, whole-directory counting, language-family file discovery, detailed source annotations, and Ruby bindings.
Developers and auditors use `ohcount` to count individual files or entire directory trees, identify source files by language family, and produce detailed annotations of a file's lines. Its ability to split mixed files, such as HTML with CSS and JavaScript regions, made it more sophisticated than plain line counters.
Package builders care about its implementation details because the Homebrew formula depends on `libmagic`, `pcre2`, and `ragel`, and applies Debian patches for modern build and PCRE2 support. The README also documents Ruby 2.x test expectations, SWIG bindings, and an unsupported Python wrapper.
Ohcount is a package-nerd artifact because it helped produce package metadata about other projects. It sits in the same historical lane as SLOC counters and open-source forges: the tool is small, but the data it helped generate shaped how people compared projects by language mix and code size.
Its formula tells the story of aging infrastructure kept buildable through distro patches. The combination of Ragel-generated scanners, Ruby bindings, PCRE migration, and GPL-2.0-only licensing gives maintainers plenty of packaging surface area for a deceptively simple CLI.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
ohcount | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/blackducksoftware/ohcount
インストールメタデータ
| パッケージキー | brew:ohcount |
|---|---|
| バージョン | 4.0.0 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/ohcount |
| ホームページ | https://github.com/blackducksoftware/ohcount |
| リポジトリ | https://github.com/blackducksoftware/ohcount |
| 上流ドキュメント | https://github.com/blackducksoftware/ohcount#readme |
| ライセンス | GPL-2.0-only |
| ソースアーカイブ | https://github.com/blackducksoftware/ohcount/archive/refs/tags/4.0.0.tar.gz |
| 最終更新 | 2026-07-11T09:50:47+09:00 |
| Pulse | updated |
| 依存関係 | libmagic, pcre2, ragel |
| ビルド依存関係 | gperf |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ohcount |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
ohcount 4.0.0-5
Source code line counter
https://github.com/blackducksoftware/ohcount
sudo apt install ohcountohcount-doc 4.0.0-5
Source code line counter - Documentation
https://github.com/blackducksoftware/ohcount
sudo apt install ohcount-docohcount 4.0.0-4build2
Source code line counter
https://github.com/blackducksoftware/ohcount
sudo apt install ohcountohcount-doc 4.0.0-4build2
Source code line counter - Documentation
https://github.com/blackducksoftware/ohcount
sudo apt install ohcount-docohcount 4.0.0-3.3
The Ohloh source code line counter
https://www.openhub.net/p/ohcount
sudo zypper install ohcountohcount
sudo port install ohcountソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.