@llbbl/uncov
v0.1.4
Published
Report files with low test coverage from Vitest/Istanbul output
Readme
uncov
A zero-dependency CLI tool that reports files with low test coverage from Vitest/Istanbul JSON output.
Features
- Zero dependencies - Single binary, instant startup
- Zero config - Just run
uncovin any project with coverage output - Cross-platform - Binaries for macOS (arm64, x64), Linux (x64), Windows (x64)
- CI-friendly - JSON output, exit codes for automation
- Optional setup - Bootstrap coverage scripts with
uncov init
Installation
Quick Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/llbbl/uncov/main/install.sh | bashThis automatically detects your platform, downloads the latest binary, verifies the checksum, and installs to your PATH.
npm / pnpm / bun
# npm
npm install -g uncov
# pnpm
pnpm add -g uncov
# bun
bun add -g uncovDownload Binary
Download the latest release for your platform from GitHub Releases.
# macOS (Apple Silicon)
curl -fsSL https://github.com/llbbl/uncov/releases/latest/download/uncov-darwin-arm64 -o uncov
chmod +x uncov
sudo mv uncov /usr/local/bin/
# macOS (Intel)
curl -fsSL https://github.com/llbbl/uncov/releases/latest/download/uncov-darwin-x64 -o uncov
chmod +x uncov
sudo mv uncov /usr/local/bin/
# Linux
curl -fsSL https://github.com/llbbl/uncov/releases/latest/download/uncov-linux-x64 -o uncov
chmod +x uncov
sudo mv uncov /usr/local/bin/Build from Source
git clone https://github.com/llbbl/uncov.git
cd uncov
bun install
bun run build:localQuick Start
Run your tests with coverage:
pnpm test:coverage # or vitest run --coverageReport low coverage files:
uncov
Output:
Files at or below 10% line coverage: 3
0.00% LH 0/LF 120 src/renderer.ts
5.26% LH 2/LF 38 src/bootstrap.ts
10.00% LH 10/LF 100 src/engine.tsCommands
uncov (default)
Report files below coverage threshold.
uncov # Files at or below 10% coverage (default)
uncov --threshold 50 # Files at or below 50% coverage
uncov --threshold 0 # Only 0% coverage files
uncov --fail # Exit 1 if any files below threshold
uncov --json # JSON output for scripting
uncov --verbose # Show debug information
uncov --no-color # Disable colorized outputuncov init
Bootstrap coverage configuration in your project.
uncov init # Interactive setup
uncov init --force # Overwrite existing config
uncov init --dry-run # Preview changes without modifying filesThis command:
- Detects your package manager (pnpm, bun, npm, yarn)
- Adds scripts to
package.json:test:coverage- Run tests with coveragecoverage:low- Run uncov
- Creates
vitest.config.tswith coverage settings - Adds
coverage/to.gitignore
uncov check
Verify coverage setup is correct.
uncov check # Verify setup
uncov check --verbose # Show detailed check informationChecks:
- Vitest config exists
- Coverage config is present
coverage-summary.jsonexists- Required scripts are configured
Configuration
uncov.config.json
{
"threshold": 10,
"exclude": ["**/*.test.ts", "**/index.ts"],
"failOnLow": false,
"coveragePath": "coverage/coverage-summary.json"
}package.json
{
"uncov": {
"threshold": 20,
"failOnLow": true
}
}Configuration Priority
- CLI flags (highest)
uncov.config.jsonpackage.jsonuncov field- Defaults (lowest)
Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success (or low coverage files found but --fail not set) |
| 1 | Low coverage files found and --fail set |
| 2 | Missing coverage-summary.json or config error |
Development
Setup
git clone https://github.com/llbbl/uncov.git
cd uncov
bun installCommands
Using Just (recommended):
just # Show available commands
just install # Install dependencies
just dev # Run CLI locally
just dev --help # Run CLI with args
just test # Run tests
just lint # Lint with Biome
just lint-fix # Fix lint issues
just build # Build local binary
just build-all # Build all platform binaries
just check # Run lint + tests
just clean # Remove build artifactsOr using bun directly:
bun run dev # Run CLI locally
bun test # Run tests
bun run lint # Lint with Biome
bun run lint:fix # Fix lint issues
bun run build:local # Build local binary
bun run build # Build all platform binariesProject Structure
uncov/
├── src/
│ ├── cli.ts # Entry point, arg parsing
│ ├── commands/ # Command implementations
│ ├── lib/ # Core logic
│ └── utils/ # Helpers
├── test/ # Tests
├── scripts/
│ └── build.ts # Cross-platform build
└── docs/
└── spec.md # Full specificationSee docs/spec.md for the full specification.
License
MIT
