Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

is-in-ci

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-in-ci

Check if the process is running in a Continuous Integration (CI) environment

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
3.9M
10.88%
Maintainers
1
Weekly downloads
 
Created
Source

is-in-ci

Check if the process is running in a Continuous Integration (CI) environment

Install

npm install is-in-ci

Usage

import isInCi from 'is-in-ci';

if (isInCi) {
	console.log('Running in a CI environment');
}

It looks for these environment variables: CI and CONTINUOUS_INTEGRATION.

CLI

is-in-ci && echo 'Running in a CI environment'

Exits with code 0 in CI environments and 1 otherwise.

FAQ

How can I add a CI service?

Request the CI service to include the CI environment variable. Most already do.

How is this different from is-ci?

The is-ci package attempts to detect every CI service, which is unsustainable. It also has a higher risk of false-positives. For example, it detects the environment variable RUN_ID as CI-specific, although other services could use it. Constant updates for new CIs create version fragmentation, resulting in inconsistent behavior across dependent packages. Pushing for CI services to use a standardized CI environment variable is a more robust solution.

  • is-inside-container - Check if the process is running inside a container
  • is-interactive - Check if stdout or stderr is interactive

Keywords

ci

FAQs

Package last updated on 17 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts