
Coverage, security and code quality for coding agents
Supercov tells your coding agent what to fix and what to test. It scores your code quality and flags security risks with Jev, runs the test command you already use, and turns uncovered paths into small, actionable queries. Your agent picks a target, writes a focused test or a focused refactor, proves what improved, and keeps going.
Paste this to your coding agent to start:
Measure code quality with npx supercov.
Scoring needs a TypeSafe AI API key, and your coding agent will usually ask you for it. It costs about a cent per megabyte of source. Coverage needs no account, config file, import, custom reporter, or hosted service. Supercov is local, free, open source, and MIT licensed.
Website · Documentation · npm · GitHub · Discord
Supported languages: JavaScript · TypeScript · Rust · Python · Ruby · Go · Java · Kotlin.
In Claude Code, Codex and Gemini CLI you can also install it as a plugin.
Supported by Supercorp.
Agent workflow: ask your coding agent
to add a test in your own project, with a recorded example to follow along.
Score your code
export TYPESAFE_API_KEY=... # get one at https://typesafe.ai
npx supercov quality
No arguments and no configuration. It finds your source, asks Jev a set of
yes/no questions about each file, and does the arithmetic itself, so every part
of a score is a claim you can check against the file.
Quality weak (3.8/10) over 163 files.
11 good, 52 fair, 100 weak.
Weakest:
weak runtime/python/supercov_runtime.py
long_method 0.96, deep_nesting 0.92, complex_conditional 0.89, +9 more
weak crates/supercov-engine/src/assertion_store.rs
long_method 0.96, deep_nesting 0.91, complex_conditional 0.86, +8 more
Narrow to what fired, read one file in full, or review a change:
npx supercov quality gaps
npx supercov quality file src/server.ts
npx supercov quality patch # your uncommitted work, or your branch
npx supercov quality patch --annotate github # workflow annotations, no token
Jev charges for what it reads and nothing for what it writes, so a megabyte of
source costs a little over a cent. Answers are cached by content, so a second
run pays only for what changed. See Understanding quality.
Find security risks
npx supercov security
npx supercov security patch # what a change introduced
Twelve security checks asked of every file with the same key, from injection
and secrets in source to paths and redirects taken from a request. Nothing is
averaged: a file is clean, or it names what fired, with the line and the code on
it where Jev confirms one. See Security surface.
Start with the suite you already have
npx supercov -- npm test
Other ways in, all the same binary at the same version: brew install supercorp-ai/tap/supercov, or for a Go project go run github.com/supercorp-ai/supercov/cmd/supercov@latest.
Everything after -- is your test command. Supercov runs it without changing your source, tests, runner configuration, or normal build output.
Then read the result and ask what is still uncovered:
npx supercov runs latest
run run_7fc676ba671d42be
command: npm test
Coverage
Lines 100.00% (5/5)
Branches 66.67% (4/6)
MC/DC 33.33% (1/3)
npx supercov runs latest gaps --limit 10
Coverage gaps — only files with unresolved obligations
src/pricing.js
uncovered: lines 0 statements 1 functions 0 branch outcomes 0 MC/DC conditions 2
After your agent adds a test, rerun the complete suite and prove the gain:
npx supercov -- npm test
npx supercov diff <previous-run-id> latest
Want to hand the evidence to a person? Generate one private, interactive file:
npx supercov report
The report opens in your browser with up to ten recent runs in a visual history.
Selecting a run compares it with the previous snapshot automatically. It has no
server, external assets, account, or file picker. It is written to
.supercov/reports/, where the store's own .gitignore keeps it out of git.
You can attach that one file directly to a pull request; a reviewer downloads
it and double-clicks it.
Use whichever complete test command the repository already trusts:
npx supercov -- npx playwright test
npx supercov -- pnpm test:e2e
npx supercov -- cargo test
npx supercov -- cargo nextest run
npx supercov -- pytest
npx supercov -- python -m unittest
npx supercov -- bundle exec rspec
See what the tests assert
Coverage says which code ran; assertion coverage says which of it the tests
would catch breaking. Supercov asks Jev, test by test,
whether changing each statement the test ran would make it fail:
npx supercov -- npm test
TYPESAFE_API_KEY=... npx supercov runs latest assertions assess
npx supercov runs latest assertions # the share asserted and what is not
Answers are reused across runs whenever the question is the same, so after a
commit only what changed is asked again. Every language Supercov measures. See
assertion coverage.
Check that the tests catch bugs
Mutation testing makes small changes to the code, such as < to <= or a
call removed, and checks that a test fails on each. A change every test passes
with is a check no test makes, even on a covered line:
npx supercov mutants -- npm test # every mutant, run against the tests that reach it
npx supercov mutants --diff origin/main # only the change's mutants, for a pull request
npx supercov runs latest mutants --diff origin/main --fail-on not-infected,not-reached
Each language uses its established tool's mutants, and its verdicts were
compared with that tool's on public projects: StrykerJS for JavaScript and
TypeScript, under Vitest, Playwright, Jest, node:test, Mocha, AVA,
node-tap, bun:test and Vitest Browser Mode; and in preview, mutmut for
Python, cargo-mutants for Rust, Gremlins for Go and mutant for Ruby. The run already knows which tests reach
each mutant and which never change its value, so a mutant no test reaches or
infects is decided without running anything, and the rest run only against
the tests that can kill them. A plain run costs nothing more. See
Mutation testing.
Give Supercov a job
Paste one of these prompts into Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, or any coding agent that can run terminal commands.
Or install the agent skill, and your agent reaches for Supercov on its own when you ask for tests, coverage, refactoring or a security scan. In Claude Code:
/plugin marketplace add supercorp-ai/supercov
/plugin install supercov@supercov
In Codex:
codex plugin marketplace add supercorp-ai/supercov
codex plugin add supercov@supercov
In Gemini CLI:
gemini extensions install https://github.com/supercorp-ai/supercov
For Cursor, GitHub Copilot and other agents that read skills: npx skills add supercorp-ai/supercov.
The Claude Code plugin and the Gemini CLI extension also add five commands you can type:
| Command |
What it does |
/supercov:coverage [test command] |
Writes one test for code no test reaches, and reports coverage before and after |
/supercov:mutants [--diff base] |
Runs the tests against mutants and writes a test for one that survives |
/supercov:security [patch] |
Scans the repository, or a change, for security vulnerabilities |
/supercov:quality [patch] |
Ranks files by code smells, or checks what a change introduced |
/supercov:review [--base ref] |
Checks a branch or uncommitted change for security and quality problems |
Write the first useful test
Measure code coverage with `npx supercov`. Use the coverage evidence to choose
one useful missing test. Only edit tests. Run the repository's complete test
suite through Supercov again and report what improved.
Use leftover tokens on coverage
Measure code coverage with `npx supercov` and write tests til 100%. Only edit
tests. Keep going while useful gaps remain.
Run the repository's complete test suite through Supercov. Use
`npx supercov runs latest gaps --limit 5` to choose one useful target at a
time. Write a focused test, rerun the same complete suite, and use
`npx supercov diff <previous-run-id> latest` to verify the gain.
Never weaken assertions or change application code to make coverage easier.
Stop if the suite fails, the evidence is incomplete, or no useful gaps remain.
The agent loop
- Run the real suite. Supercov executes the command after
-- in an isolated workspace.
- Find one useful gap. Short, paginated queries show uncovered files, lines, branches, decisions, and value paths without loading a large HTML report into context.
- Write one focused test. The coding agent changes tests—not application code or coverage configuration.
- Rerun and prove the gain.
diff shows exactly what the new test covered.
- Repeat while useful gaps remain. Failed tests, incomplete evidence, or ambiguous scope stay visible instead of being rounded away.
Supercov supplies the coverage signal and evidence. It does not host, schedule, or replace your coding agent.
Use leftover tokens on coverage
Before a reset—or overnight—turn idle agent time into coverage that stays with the repository. Each pass closes a small number of useful gaps and finishes with evidence that the tests still pass and coverage improved.
Use it in a software factory
Add Supercov as a repeatable quality loop in an automated software factory. Your factory schedules the work; Supercov gives each agent a bounded next task and an immutable record of the result.
Every pass runs the real suite, chooses an uncovered path, writes a focused test, reruns, and proves the gain. Fresh executable evidence lets agents keep iterating around the clock while failed tests and regressions stop the loop before they ship.
Coverage agents can act on
From lines and branches to MC/DC, every gap becomes a concrete test target. Supercov measures:
- lines, statements, functions, and branches;
- MC/DC independence witnesses;
- optional-chain, default-value, and logical-assignment paths;
try/catch and zero-iteration control-flow paths; and
- per-test provenance where the runner exposes exact test boundaries.
The denominator comes from source structure before the run, so adding or removing tests cannot silently change what 100% means. Ambiguous source scope, uninstrumented code, and missing evidence remain visible as completeness blockers.
Install for your language
Measuring a project should not start by installing another language. The same binary, at the same version, from one release:
npx supercov -- npm test # npm
uvx --from supercov-cli supercov -- pytest # PyPI
gem install supercov && supercov -- bundle exec rspec # RubyGems
cargo binstall supercov && supercov -- cargo test # crates.io
go run github.com/supercorp-ai/supercov/cmd/supercov@latest -- go test ./... # Go
brew install supercorp-ai/tap/supercov && supercov -- ./gradlew test # Homebrew
pip install supercov-cli and gem install supercov install a wheel or gem that carries the binary for your platform; nothing is compiled. cargo binstall downloads that same binary from the GitHub release, while plain cargo install supercov builds it from source and needs Rust 1.95.
A Go project needs Go and nothing else. Like any go run with a version suffix it resolves by module path and ignores the go.mod in your current directory, so it neither needs nor touches your module.
Java and Kotlin have no registry of their own here, so a JVM project takes the binary directly -- Homebrew above, npx if Node is already present, or the platform archive from the latest release. Maven and Gradle are driven as your test command, not as a plugin. Supercov adds the JUnit Platform launcher its measurement needs to the build file inside its own isolated workspace copy -- your pom.xml or build.gradle is never edited.
Supported languages
| Language |
Status |
Install |
Start with |
| JavaScript |
Available |
nothing, npx fetches it |
npx supercov -- npm test |
| TypeScript |
Available |
nothing, npx fetches it |
npx supercov -- npm test |
| Rust |
Available |
cargo install supercov |
supercov -- cargo test |
| Python |
Available |
python -m pip install supercov-cli |
supercov -- python -m pytest |
| Ruby |
Available |
gem install supercov |
supercov -- bundle exec rspec |
| Go |
Available |
nothing, go run fetches it |
go run github.com/supercorp-ai/supercov/cmd/supercov@latest -- go test ./... |
| Java |
Available |
brew install supercorp-ai/tap/supercov |
supercov -- mvn test |
| Kotlin |
Available |
brew install supercorp-ai/tap/supercov |
supercov -- ./gradlew test |
| Zig |
Coming soon |
— |
— |
| PHP |
Coming soon |
— |
— |
| C |
Coming soon |
— |
— |