covpeek

Cross-language Coverage Report CLI Parser written in Go.

Parse coverage reports from Rust, Go, TypeScript, JavaScript, and Python with one unified tool.

covpeek currently supports Rust (LCOV), Go, TypeScript/JavaScript (LCOV), Python (Cobertura XML), and Python (JSON) coverage formats.

Free and Open Source! Licensed under AGPL-3.0

Features

Multi-language Support

Parse coverage files from Rust (LCOV format generated by grcov or tarpaulin), Go (native coverage format), TypeScript/JavaScript (LCOV format generated by nyc/Istanbul), and Python (Cobertura XML and JSON formats).

Auto-detection

Automatically detects coverage file format by extension or content. No need to specify the format manually.

Multiple Output Formats

Display coverage data as Table (default, sorted by coverage), JSON for programmatic use, or CSV for spreadsheet import.

Interactive TUI

Explore coverage data with a beautiful terminal user interface. Navigate through files and view detailed coverage information interactively.

Platform Integration

Upload coverage reports directly to SonarQube and Codecov platforms. Perfect for CI/CD pipelines.

CI/CD Ready

Check coverage thresholds for continuous integration, generate SVG badges for your README, and compare coverage between git commits.

Usage Examples

# Parse a coverage file
covpeek --file coverage.lcov

# Generate coverage badge
covpeek badge --file coverage.lcov --output coverage-badge.svg

# Upload to SonarQube
covpeek upload --to sonarqube --project-key myproject --file coverage/lcov.info --token $SONAR_TOKEN

# Upload to Codecov
covpeek upload --to codecov --repo-token $CODECOV_TOKEN

# Check coverage threshold in CI
covpeek ci --min 80

# Compare coverage between commits
covpeek diff --file coverage/lcov.info --commit-a HEAD~5 --commit-b HEAD

# Launch interactive TUI
covpeek --file coverage.lcov --tui

The CLI is simple and intuitive to use.

Parse any coverage file with the --file flag and optionally specify an output format.

Use --tui to launch the interactive terminal interface for exploring coverage data.

Generate badges with the badge command for embedding in README files or dashboards.

Upload reports to platforms like SonarQube or Codecov using the upload command.

Use the ci command to check coverage thresholds in your CI/CD pipeline.

Compare coverage between commits with the diff command to track improvements or regressions.

Installation

Download pre-built binaries for your platform:

Supported Coverage Formats

LCOV Format

Used by Rust (grcov, tarpaulin) and TypeScript/JavaScript (nyc/Istanbul).

File extensions: .lcov, .info, lcov.info

Supports TN, SF, FN, FNDA, DA, LH, LF, end_of_record records. Branch coverage (BRF, BRH, BRDA) is also supported.

Go Coverage Format

Native Go coverage format generated by go test -coverprofile.

File extension: .out

Format: mode: set|count|atomic followed by coverage entries.

Python Coverage Formats

Cobertura XML and JSON formats generated by the coverage package.

XML: coverage.xml | JSON: coverage.json

Questions?

Please share feedback like feature requests or bug reports on GitHub Issues.

Contributions are welcome! Check out the repository to get started.