1# is-ci 2 3Returns `true` if the current environment is a Continuous Integration 4server. 5 6Please [open an issue](https://github.com/watson/is-ci/issues) if your 7CI server isn't properly detected :) 8 9[](https://www.npmjs.com/package/is-ci) 10[](https://travis-ci.org/watson/is-ci) 11[](https://github.com/feross/standard) 12 13## Installation 14 15```bash 16npm install is-ci --save 17``` 18 19## Programmatic Usage 20 21```js 22const isCI = require('is-ci') 23 24if (isCI) { 25 console.log('The code is running on a CI server') 26} 27``` 28 29## CLI Usage 30 31For CLI usage you need to have the `is-ci` executable in your `PATH`. 32There's a few ways to do that: 33 34- Either install the module globally using `npm install is-ci -g` 35- Or add the module as a dependency to your app in which case it can be 36 used inside your package.json scripts as is 37- Or provide the full path to the executable, e.g. 38 `./node_modules/.bin/is-ci` 39 40```bash 41is-ci && echo "This is a CI server" 42``` 43 44## Supported CI tools 45 46Refer to [ci-info](https://github.com/watson/ci-info#supported-ci-tools) docs for all supported CI's 47 48## License 49 50[MIT](LICENSE) 51