ci-info
Continuous Integration Information
What it is and what it does
ci-info is a Python port of the Node.js watson/ci-info library that detects whether code is running on a continuous integration platform and identifies which one. It exposes a simple API to check if the current environment is a CI server, retrieve the server's name, detect whether a pull request is being tested, and access all detection results as a dictionary.
The package works by checking environment variables specific to each supported CI platform. It recognizes dozens of CI systems including GitHub Actions, GitLab CI, CircleCI, Travis CI, Jenkins, Azure Pipelines, and many others. For some platforms it can also determine whether the build is testing a pull request. If the environment matches vendor-neutral CI indicators but no specific platform is identified, is_ci() returns True while name() returns None.
Use it for:
- Conditionally run code only when executing in a CI environment, such as skipping interactive prompts or enabling verbose logging
- Detect pull request builds to apply different validation rules or reporting for PR checks versus main branch builds
- Log or report which CI platform is running a build for debugging or analytics purposes
- Customize build behavior based on the detected CI server's capabilities or conventions
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects which continuous integration platform code is running on and provides information about the CI environment, including PR detection for supported servers.
Yes. The package has zero dependencies, low install friction, active maintenance, a permissive MIT license, and solves a genuine need for CI-aware Python applications. It covers a broad set of CI platforms and is stable enough for production use.
Install
ci-info on PyPI
pip
pip install ci-infouv
uv add ci-infopoetry
poetry add ci-infoInstalling ci-info
Before you install
Low install friction with no runtime dependencies. Active maintenance with a recent release in February 2026, though the repository has minimal stars.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with only attribution required.
Quickstart
pip install ci-info
import ci_info
if ci_info.is_ci():
print(ci_info.name())
print(ci_info.is_pr())
print(ci_info.info())
Verify before relying
- Whether the package maintains compatibility with all listed CI platforms as they evolve their environment variable conventions
- Performance characteristics when called repeatedly in tight loops during CI execution
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 193 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 534,921/month — #6,130 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ci_info-0.4.0-py2.py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
extra-platformsDetects and exposes rich metadata about runtime…
permissive · top 15,000 on PyPI
codecovUploads Python code coverage reports to…
permissive · top 5,000 on PyPI
idGenerates OIDC identity tokens by automatically…
permissive · top 1,000 on PyPI
opentelemetry-resourcedetector-gcpAutomatically detects and reports GCP resource…
permissive · top 5,000 on PyPI
detect_agentDetects whether code is running in an AI agent…
unclear · top 15,000 on PyPI
socketsecuritySocket Security CLI scans Python projects for…
permissive · top 15,000 on PyPI
mypy-gitlab-code-qualityConverts mypy type-checking output into GitLab…
permissive · top 15,000 on PyPI
cigamDetects and reports file types, MIME types, and…
permissive · top 15,000 on PyPI
fabric-cicdAbstracts Microsoft Fabric API interactions for…
permissive · top 15,000 on PyPI
buildkite-sdkA Python SDK for interacting with Buildkite's…
unclear · top 15,000 on PyPI