--- id: wait-for-it version: "2.3.0" license: unclear license_treatment: permissive maintenance: active --- # wait-for-it — Wait for service(s) to be available before executing a command. License: permissive · Maintenance: active · Downloads: 202.1K/mo ## What it is and what it does wait-for-it is a lightweight CLI utility that polls TCP ports (or HTTPS endpoints) to detect when services are ready, then runs a command you specify. It's designed for scenarios where one service depends on another being up first—the canonical use case is Docker Compose or Kubernetes-style orchestration where containers start in an unpredictable order. The tool can test services serially (one after another) or in parallel, with a configurable timeout (default 15 seconds, or unlimited if set to 0), and returns the exit code of the command it executes. You invoke it from the shell with `--service` flags naming each host:port to check, optionally `--parallel` to test them concurrently, and a `--` separator followed by the command to run once all services are available. It's a pure Python script with only click as a runtime dependency, making it quick to install and run in containers or CI/CD pipelines. Use it for: - Docker Compose entrypoint: wait for database and cache services to be ready before starting an application. - Kubernetes init container: ensure dependent microservices are reachable before the main pod starts. - CI/CD pipeline: delay test execution until all test infrastructure (mock servers, databases) is listening. - Local development: coordinate startup of multiple services in a Makefile or shell script. - Health-check orchestration: verify multiple endpoints are up before triggering a deployment step. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A command-line tool that waits for one or more TCP services to become available before executing a specified command, useful for coordinating startup of interdependent services. Yes. It solves a common orchestration problem with minimal overhead, has no security vulnerabilities, is actively maintained, and carries a permissive license. Install it if you need to synchronize service startup in Docker, Kubernetes, or any shell-based workflow. ## Install pip install wait-for-it uv add wait-for-it poetry add wait-for-it ## Installing wait-for-it Before you install: Low install friction with a single runtime dependency (click). Actively maintained as of 2026-08-10 with recent releases, supporting modern Python versions 3.9 through 3.13. License in practice: MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, making it safe for both open-source and commercial projects. Quickstart: pip install wait-for-it wait-for-it --service www.google.com:80 -- echo "service is up" Requires Python 3.9 or later; TCP connectivity to the target service(s) is necessary for the tool to function. Verify before relying: - Whether the tool supports IPv6 addresses beyond the documented '[v6addr]:port' format syntax. - Performance characteristics when testing many services in parallel mode. - Whether HTTPS service checks perform full TLS validation or only connection establishment. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 202.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags wait for tcp service startup, docker container orchestration, service readiness check, port availability polling, wait for host port, service dependency synchronization, health check before command, service-orchestration, docker-compose, devops [View on SkillFed](https://skillfed.io/packages/wait-for-it) · [View on PyPI](https://pypi.org/project/wait-for-it/)