#ci #build #environment #checker #tell #package #you-re

build is_ci

Super lightweight CI environment checker. Just tells you if you're in CI or not without much fuss.

6 releases (stable)

1.2.0 Feb 4, 2024
1.1.1 Sep 22, 2021
1.0.1 Sep 22, 2021
0.0.0 Sep 22, 2021

#37 in Build Utils

Download history 52948/week @ 2023-12-24 87894/week @ 2023-12-31 101327/week @ 2024-01-07 113740/week @ 2024-01-14 107645/week @ 2024-01-21 105241/week @ 2024-01-28 121902/week @ 2024-02-04 107971/week @ 2024-02-11 100733/week @ 2024-02-18 107431/week @ 2024-02-25 115494/week @ 2024-03-03 119650/week @ 2024-03-10 121554/week @ 2024-03-17 120473/week @ 2024-03-24 119812/week @ 2024-03-31 94117/week @ 2024-04-07

466,061 downloads per month
Used in 264 crates (14 directly)

ISC license

6KB
62 lines

This crate tells you if you're in a CI environment or not. It does not tell you which you're in, but it makes a good effort to make sure to accurately tell you whether you're in one.

This crate is based on the @npmcli/ci-detect package.

If you need more information about the specific CI environment you're running in and you can handle a heavier dependency, please consider using ci_info instead.

Example

// You can call this repeatedly if you want to get the same result, cached.
let am_i_in_ci_right_now = is_ci::cached();

// If you expect your environment to change between calls, use this instead:
let checking_again_just_in_case = is_ci::uncached();

License

is_ci is released to the Rust community under the ISC License.

It is based on @npmcli/ci-detect which is released to the community under the ISC License.

No runtime deps