ci_info Build Status Build status codecov
license for GitHub Documentation downloads
Built with cargo-make

Provides current CI environment information.


This library main goal is to provide development/build tools such as cargo-make the needed information on the current CI environment.
The code is based on the ci-info npm module.


Simply include the library and invoke the get function to pull all info as follows:

extern crate ci_info;

fn main() {
    // Just check if a CI environment is detected.
    let ci = ci_info::is_ci();
    println!("Is CI: {}", ci);

    // Get CI environment information
    let info = ci_info::get();
    println!("Is CI: {}",;
    if info.vendor.is_some() {
        println!("Vendor: {:#?}", info.vendor.unwrap());
        println!("Name: {:#?}",;
    if {
        println!("Is PR: {:#?}",;
    if info.branch_name.is_some() {
        println!("Branch Name: {:#?}", info.branch_name.unwrap());


In order to use this library, just add it as a dependency:

ci_info = "*"

There is optional serde support that can be enabled via the serde-1 feature:

ci_info = { version = "*", features = ["serde-1"] }

API Documentation

See full docs at: API Docs


See contributing guide

Release History

See Changelog


Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.