CheckOps
nyc (Istanbul)
nyc is the ISC-licensed command-line interface for Istanbul, the long-standing JavaScript code coverage tool that instruments code to report line, branch, function and statement coverage.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
nyc is the command-line interface for Istanbul, the most widely used JavaScript coverage instrumenter. It instruments your source code so that running tests records which statements, branches, functions and lines executed, then produces reports with Istanbul’s reporters. Many frameworks, including Jest, use Istanbul internally.
Run nyc mocha (or any test command) and nyc wraps the subprocesses. Configuration in .nycrc or package.json controls include/exclude, all (to include untested files), reporters (text, HTML, lcov and more), and check-coverage thresholds. Source maps and Babel integration (babel-plugin-istanbul) support transpiled code. The latest release, nyc 18.0.0, was published on 22 February 2026, though development is slower than c8.
The source code is at istanbuljs/nyc on GitHub under the ISC licence, with about 5,800 stars; the most recent commit was on 17 May 2026.
In CI, nyc’s lcov output is the usual input for coverage services such as Codecov and Coveralls.
Features
- Mature instrumentation: Accurate statement, branch, function and line coverage.
- Wraps any runner:
nyc <command>. - Many reporters: text, HTML, lcov, Cobertura and more.
- Thresholds: Fail builds when coverage drops.
Pros
- Free to use: Open source under the ISC licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 17 May 2026.
- Community: About 5,800 GitHub stars.
Cons
- Instrumentation overhead: Slower than native V8 coverage.
- ESM friction: Modern ESM projects often find c8 simpler.
Usage and Links (Example)
npm install --save-dev nyc
npx nyc --reporter=html --reporter=text mocha
.nycrc.json:
{ "all": true, "include": ["src/**/*.js"], "check-coverage": true, "branches": 80, "lines": 85 }
Resources:
Pricing
nyc (Istanbul) is free and open source under the ISC licence.
Recommended for?
- Existing projects already using nyc or Babel-instrumented builds.
- Teams needing Istanbul’s instrumentation model for specific tooling.
Conclusion
nyc is the classic Istanbul CLI and still reliable; for new ESM-first projects, c8 is often the lighter choice.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with nyc (Istanbul) side by side.
Cc8c8 is an ISC-licensed code coverage tool for Node.js that uses V8's built-in coverage instead of instrumentation, producing Istanbul-compatible reports for any test runner.Compare with nyc (Istanbul)
CCodecovCodecov by Sentry is a code coverage reporting service that shows coverage for any language, CI and code host in pull request comments and dashboards, with flags, carryforward, test analytics for flaky tests and AI test generation.Compare with nyc (Istanbul)
CCoverallsCoveralls is a hosted code coverage history and statistics service that integrates with your CI to report repository, file and line-by-line coverage with pull request notices; free for open source with paid plans for private repos.Compare with nyc (Istanbul)
MMochaMocha is a long-running, MIT-licensed JavaScript test framework for Node.js and browsers, with BDD and TDD interfaces, async support, hooks, parallel mode and a large reporter ecosystem.Compare with nyc (Istanbul)
JJasmineJasmine is a long-established, MIT-licensed behaviour-driven JavaScript testing framework for browsers and Node.js, with built-in assertions, spies and asynchronous support and no required dependencies.Compare with nyc (Istanbul)
Nnode-tapnode-tap (the `tap` package from tapjs) is a full-featured Node.js test framework built on the Test Anything Protocol, with TypeScript support, built-in coverage, snapshots, mocking and a plugin system.Compare with nyc (Istanbul)