Hits-of-Code Badges is a badge API for code repositories that displays the Hits-of-Code (HoC) metric. HoC was proposed by Yegor Bugayenko. Unlike Lines-of-Code, it counts lines changed over a repository’s history, so it only increases and never decreases. The metric does not reflect code quality, but it can serve as a rough proxy for the amount of work invested in a codebase.
The service supports repositories on GitHub, GitLab, Bitbucket, and Sourcehut. Users only need to add the specified Markdown to their README to generate a badge. The API attempts to detect the default branch automatically, while the branch parameter can be used to specify a branch manually. The label parameter customizes the badge text, and the exclude parameter can exclude files by filename or glob patterns similar to .gitignore, such as lock files or generated files. In addition, appending /json returns structured data, including the HoC value, commit count, and HEAD reference, making it easier to integrate with scripts or internal dashboards.
The page states that the entire service is licensed under MIT, with source code available on GitHub, and that feature proposals and Pull Requests are welcome. This is useful for teams that need to audit or extend the service. The documentation is practical in nature: it explains the meaning of the metric, provides Git commands for calculating it, includes Markdown examples, JSON response examples, and parameter descriptions. However, it does not explain deployment methods, rate limits, caching strategy, private repository support, authentication, or SLA.
The page does not mention any paid plans or payment methods, so it can be regarded as a free public service plus open-source code model. Its advantages are a low barrier to use, clear parameters, support for several major code hosting platforms, and JSON output. The drawbacks are also clear: HoC only measures the volume of changes and does not represent quality, complexity, or productivity; service availability and long-term maintenance commitments are unclear.
It is suitable for open-source project maintainers, individual developers, or teams that want to show the scale of a project’s evolution in a README. For serious engineering metrics, it should still be combined with tools for code quality, test coverage, complexity, and similar measures. The page does not provide information about access from China, and since the service depends on external code hosting platforms, actual availability may be affected by network conditions. Alternatives include Shields.io, self-hosted Git statistics scripts, or generating custom badges with GitHub Actions.
⚠ This review is compiled from public sources and does not constitute a purchase recommendation. Verify all facts on the vendor's official site. Verify on hitsofcode.com official site.
hitsofcode.com is an Unknown Dev Tools provider. TG4G tracks its product information, an overall rating of 6.0/10, and a China-accessibility score of China direct-connect friendly. Click "Visit Official Site" to reach hitsofcode.com directly.