Gathering detailed insights and metrics for @npmcli/ci-detect
Gathering detailed insights and metrics for @npmcli/ci-detect
Gathering detailed insights and metrics for @npmcli/ci-detect
Gathering detailed insights and metrics for @npmcli/ci-detect
Detect what kind of CI environment the program is in
npm install @npmcli/ci-detect
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.9
Supply Chain
93.6
Quality
81.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
230,913,469
Last Day
37,612
Last Week
599,888
Last Month
2,610,825
Last Year
26,949,941
ISC License
53 Stars
73 Commits
13 Forks
4 Watchers
2 Branches
71 Contributors
Updated on Nov 15, 2023
Minified
Minified + Gzipped
Latest Version
3.0.2
Package Id
@npmcli/ci-detect@3.0.2
Unpacked Size
6.79 kB
Size
3.14 kB
File Count
4
NPM Version
9.1.1
Node Version
18.12.0
Cumulative downloads
Total Downloads
Last Day
-33%
37,612
Compared to previous day
Last Week
-17.1%
599,888
Compared to previous week
Last Month
21.2%
2,610,825
Compared to previous month
Last Year
-25.5%
26,949,941
Compared to previous year
3
Detect what kind of CI environment the program is in
1const ciDetect = require('@npmcli/ci-detect') 2// false if not in CI 3// otherwise, a string indicating the CI environment type 4const inCI = ciDetect()
Returns one of the following strings, or false
if none match, by looking
at the appropriate environment variables.
CI_NAME
environment variable will return the
value as the result. (This is how CodeShip is detected.)'aws-codebuild'
AWS CodeBuild'azure-pipelines'
Azure Pipelines'bamboo'
Bamboo'bitbucket-pipelines'
Bitbucket Pipelines'bitrise'
Bitrise'buddy'
Buddy'builder'
Google Cloud Builder - This one is a bit weird. It
doesn't really set anything that can be reliably detected except
BUILDER_OUTPUT
, so it can get false positives pretty easily.'buildkite'
Buildkite'circleci'
Circle-CI'cirrus'
Cirrus CI'codeship'
CodeShip'custom'
anything else that sets CI
environment variable to either
'1'
or 'true'
.'drone'
Drone'dsari'
dsari CI'gerrit'
Gerrit'github-actions'
GitHub Actions'gitlab'
GitLab'gocd'
GoCD'heroku'
Heroku'hudson'
Hudson CI'jenkins'
Jenkins'magnum'
Magnum CI'netlify'
Netlify'nevercode'
Nevercode'now'
Zeit.co's Now service, but not GitHub/BitBucket/GitLab'now-bitbucket'
Zeit.co's Now for BitBucket deployment service'now-github'
Zeit.co's Now for GitHub deployment service'now-gitlab'
Zeit.co's Now for GitLab deployment service'render'
Render CI'sail'
Sail CI'screwdriver'
Screwdriver CI'semaphore'
Semaphore'shippable'
Shippable'strider'
Strider CI'taskcluster'
Mozilla Taskcluster'tddium'
TDDium'teamcity'
TeamCity'travis-ci'
Travis-CI - A few other CI systems set TRAVIS=1
in the
environment, because devs use that to indicate "test mode", so this
one can get some false positives, and is tested later in the process
to minimize this effect.'vercel'
Vercel'vercel-bitbucket'
Vercel Bitbucket'vercel-github'
Vercel GitHub'vercel-gitlab'
Vercel Gitlab'wercker'
Oracle Wercker'woodpecker'
Woodpecker CISince any program can set or unset whatever environment variables they want, this is not 100% reliable.
Also, if your program does different behavior in CI/test/deployment than other places, then there's a good chance that you're doing something wrong!
But, for little niceties like setting colors or other output parameters, or logging and that sort of non-essential thing, this module provides a way to tweak without checking a bunch of things in a bunch of places. Mostly, it's a single place to keep a note of what CI system sets which environment variable.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 3/6 approved changesets -- score normalized to 5
Reason
project is archived
Details
Reason
dangerous workflow patterns detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More