# Istanbul (nyc)

the Istanbul command line interface

Repository: https://github.com/istanbuljs/nyc
Canonical: https://ross.abutalabs.com/products/istanbul-nyc
Homepage: https://istanbul.js.org/
Language: JavaScript
License: ISC
License Family: permissive
Topics: code-coverage, javascript, istanbul
Last push: 2026-05-17T16:05:31+00:00
Link (homepage): https://istanbul.js.org/
Link (site_page): https://istanbul.js.org/docs/tutorials
Link (site_page): https://istanbul.js.org/docs/advanced
Link (site_page): https://istanbul.js.org/integrations

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 39, longevity 100
- inputs: {"age_days": 4134, "days_push": 108, "days_rel": 192, "gap_med": 521, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5766, forks 363 (observed 2026-08-28T04:09:29.403956+00:00)

## What it is
nyc is the official command-line interface for Istanbul, a JavaScript code coverage tool that instruments ES5 and ES2015+ code with line counters. It wraps test runners like mocha, AVA, and tap to collect and report coverage, including source-mapped coverage for Babel and TypeScript projects.

## Use cases
- measure code coverage of my mocha tests
- generate lcov and html coverage reports for a JavaScript project
- get coverage for TypeScript or Babel code
- instrument subprocesses spawned during tests
- track how well unit tests exercise the codebase

## When to choose
- you need coverage for a Node.js project using mocha, AVA, or a runner without built-in coverage
- you need source-mapped coverage for Babel or TypeScript
- you need to instrument subprocesses spawned by your tests

## When to avoid
- you use Jest or node-tap, which already bundle Istanbul coverage
- you prefer V8-native coverage via c8 without instrumentation

## Facets
- artifact type: cli-tool
- maturity: stable
- function: testing, cli, developer-tools
- domain: testing, developer-tools
- platform: cli, cross-platform
- tags: code-coverage, istanbul, javascript, instrumentation, test-coverage, mocha, source-maps, nodejs

## Member repositories
- istanbuljs/nyc (main) score 71
- istanbuljs/istanbuljs (sdk) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.403956+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:55.463414+00:00, confidence not recorded.
  - readme: https://github.com/istanbuljs/nyc (fetched 2026-08-28T04:09:29.403956+00:00, sha 2d7e255ac0bc)
  - homepage: https://istanbul.js.org/ (fetched 2026-08-29T08:48:55.424420+00:00, sha fd7d4665a956)
  - site_page: https://istanbul.js.org/docs/tutorials (fetched 2026-08-29T08:48:55.426912+00:00, sha e230905c262a)
  - site_page: https://istanbul.js.org/docs/advanced (fetched 2026-08-29T08:48:55.428561+00:00, sha 95604956c652)
  - site_page: https://istanbul.js.org/integrations (fetched 2026-08-29T08:48:55.430044+00:00, sha 814122882865)
- Data as of 2026-08-30T08:39:29.467469+00:00.
