# octocov

> Code metrics toolkit for collecting coverage, code-to-test ratio, test execution time, and custom metrics from multiple report formats

Stars: 517 · Language: Go · Categories: Dev Tools

- Repository: https://github.com/k1LoW/octocov
- Website: https://octocov.dev
- Page: https://www.trmn.sh/tools/octocov

## Overview

octocov is a code metrics collection and reporting toolkit that analyzes coverage reports, code-to-test ratios, test execution times, and custom metrics. It supports multiple coverage report formats including Go, JavaScript, Python, and Java ecosystems, making it language-agnostic for most development workflows.

The tool operates both as a CI integration and standalone CLI. In GitHub Actions, it automatically comments code metrics on pull requests, generates job summaries, and can store reports to various datastores including GitHub repositories, S3, BigQuery, and Google Cloud Storage. As a CLI tool, it provides terminal-based viewing with commands like `octocov ls-files`, `octocov view`, and `octocov diff` for comparing metrics between reports.

octocov includes validation capabilities through configurable acceptance thresholds that fail builds when coverage drops below specified levels. It can generate self-hosted SVG badges for metrics, eliminating dependencies on external badge services. The tool also supports a central mode for aggregating reports across multiple repositories and can merge coverage data from parallel CI jobs or test shards.

Developers and DevOps teams use octocov to maintain code quality standards, track metrics over time, and integrate coverage reporting into their CI/CD pipelines. The configuration is managed through `.octocov.yml` files, and the tool integrates with GitHub Actions through the dedicated octocov-action.

![Pull request comment with coverage metrics](https://media.trmn.sh/cached/30bb02bc6425686064ef3c71abf0feafa12a1472fb2aed5d808a318b3f74a7f9.png)

![GitHub Actions job summary](https://media.trmn.sh/cached/25f24ba5c3e3cc06a7d4aa03dfa988813bb36e3f06e62007688cc892cf9fb96f.png)

![Terminal interface showing coverage view](https://media.trmn.sh/cached/56c50e97c15915c018529e19ebcb6bb65ec55b7e5c51147a3b12ab67535b2c0d.svg)

## Alternatives

- [awsesh](https://www.trmn.sh/tools/awsesh.md): TUI and CLI tool for managing AWS SSO sessions with fuzzy search, account switching, and shell integration. (Go, 143 stars)
- [envdiff](https://www.trmn.sh/tools/envdiff.md): Snapshots a machine's system info, runtimes, env vars and network config to JSON, diffs snapshots, and validates environments against a YAML file. (Go, 25 stars)
- [flyctl](https://www.trmn.sh/tools/flyctl.md): Command-line interface for fly.io that authenticates accounts, lists apps, and checks app status; also invoked as fly. (Go, 1.7k stars)
- [nap](https://www.trmn.sh/tools/nap.md): Code snippet manager with CLI and TUI for creating, organizing, and accessing snippets in the terminal (Go, 2.2k stars)
- [freeze](https://www.trmn.sh/tools/freeze.md): Generate PNG, SVG, and WebP images of code and terminal output with syntax highlighting and customizable styling. (Go, 4.9k stars)

---

Canonical: https://www.trmn.sh/tools/octocov
