The `is-ci` package provides a minimalist, direct method for determining whether the current process is executing within a Continuous Integration (CI) environment. It exposes a simple boolean value (`true` if running in CI, `false` otherwise), abstracting away the complexities of checking various environment variables across different CI providers. The current stable version is `4.1.0`. The library typically sees updates in conjunction with its underlying dependency, `ci-info`, which is responsible for the core detection logic, leading to an irregular but feature-driven release cadence. Its primary differentiator is its singular focus on providing a simple boolean answer, making it ideal for conditional logic in build scripts, test runners, or deployment pipelines where CI context is crucial. It supports a wide array of CI services by leveraging `ci-info`'s comprehensive detection capabilities.
npm install is-ciVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use `is-ci` in both ESM and CJS contexts to conditionally execute code based on CI environment detection.
If your workflows rely on detecting Shippable CI or Solano CI, `is-ci` will no longer identify them. You may need to update your CI configuration or use alternative detection methods for these specific platforms, or consider migrating to a currently supported CI service.
Always use `isCI` directly as a boolean expression, e.g., `if (isCI) { ... }`.Use `isCI` directly as a boolean. Correct: `if (isCI) { ... }`. Incorrect: `if (isCI()) { ... }`.For ES Modules, use `import isCI from 'is-ci';`. If you must use CommonJS modules, ensure your file is `.js` and your `package.json` does not specify `"type": "module"`, or use a bundler/transpiler configured for CommonJS.