{"id":13542580,"url":"https://github.com/sindresorhus/is-in-ci","last_synced_at":"2025-04-12T05:45:51.397Z","repository":{"id":204008599,"uuid":"710923484","full_name":"sindresorhus/is-in-ci","owner":"sindresorhus","description":"Check if the process is running in a Continuous Integration (CI) environment","archived":false,"fork":false,"pushed_at":"2024-07-26T11:33:14.000Z","size":5,"stargazers_count":32,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T12:01:35.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2023-10-27T18:28:31.000Z","updated_at":"2025-03-28T05:27:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8b012ac-a598-4365-bf73-2163780db130","html_url":"https://github.com/sindresorhus/is-in-ci","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"411a4f4ca892057120429c4a1a2cb831f7123fab"},"previous_names":["sindresorhus/is-in-ci"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fis-in-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fis-in-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fis-in-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fis-in-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/is-in-ci/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096933,"owners_count":21047134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:01:11.622Z","updated_at":"2025-04-12T05:45:51.359Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# is-in-ci\n\n\u003e Check if the process is running in a [Continuous Integration](https://en.wikipedia.org/wiki/Continuous_integration) (CI) environment\n\n## Install\n\n```sh\nnpm install is-in-ci\n```\n\n## Usage\n\n```js\nimport isInCi from 'is-in-ci';\n\nif (isInCi) {\n\tconsole.log('Running in a CI environment');\n}\n```\n\nIt looks for these environment variables: `CI`, `CONTINUOUS_INTEGRATION`, or any with a `CI_` prefix.\n\n## CLI\n\n```sh\nis-in-ci \u0026\u0026 echo 'Running in a CI environment'\n```\n\nExits with code `0` in CI environments and `1` otherwise.\n\n## FAQ\n\n### How can I add a CI service?\n\nRequest the CI service to include the `CI` environment variable. Most already do.\n\n### How is this different from [`is-ci`](https://github.com/watson/is-ci)?\n\nThe `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.\n\n## Related\n\n- [is-inside-container](https://github.com/sindresorhus/is-inside-container) - Check if the process is running inside a container\n- [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fis-in-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fis-in-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fis-in-ci/lists"}