ohcount
« Back to VersTracker
Description:
Source code line counter
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: metrics cli developer-tools code-analysis counting
Install: brew install ohcount
About:
Ohcount is a command-line tool that accurately counts lines of source code within a file or directory. It distinguishes between actual code, comments, and blank lines, providing a detailed breakdown. The tool supports a wide array of programming languages, making it invaluable for developers analyzing project complexity and maintenance.
Key Features:
  • Detects code, comments, and blank lines separately
  • Supports over 30 programming languages
  • Provides language breakdowns for mixed-source files
  • Fast and lightweight C implementation
Use Cases:
  • Generating software metrics and complexity reports
  • Auditing codebases for comment density and quality
  • Estimating development effort and scope
Alternatives:
  • cloc – cloc is written in Perl and often offers more granular language detection, while Ohcount is a faster, compiled C binary.
  • sloccount – sloccount focuses on estimating development cost and effort, whereas Ohcount focuses strictly on raw line counts.
Version History
Detected Version Rev Change Commit
Sep 16, 2025 8:46am 0 VERSION_BUMP 4581844f