Skip to content
pubscout

ci

0.1.0, released 5 years ago by invertase.io

Detect CI environments and inspect CI vendor details in Dart scripts.

Repository archived
$ flutter pub add ci
Source repository

What it does

Inspects environment variables to determine whether code is executing within a continuous integration (CI) service. It provides vendor detection (e.g., GitHub Actions) and identifies whether the current run was triggered by a pull request. The package requires zero runtime dependencies and is designed for CLI tools and scripts.

AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building CLI tools or build scripts that need different behavior when executed locally versus in CI.
  • You need to detect whether a CI build is running for a pull request.
  • You want to identify the specific CI vendor hosting your execution environment.

Skip it when

  • You are building a client-side Flutter application where CI detection is irrelevant.
  • You only need basic platform environment variable lookups without vendor-specific metadata.

Strengths

  • Zero external dependencies.
  • Supports vendor detection sourced from the widely used watson/ci-info database.
  • Simple top-level API with boolean flags and vendor properties.

Weaknesses

  • Very early release version (0.1.0) with minimal documentation.
  • Does not support the web platform.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:ci/ci.dart' as ci;

void main() {
  if (ci.isCI) {
    print('Running on CI vendor: ${ci.currentVendor?.name}');
    print('Is pull request: ${ci.isPullRequest}');
  }
}

Works with

Packages commonly used together with ci: ones it builds on, ones built on it, and its own family.