Skip to main content

Overview

The ports section validates that specific network ports are available for use. This prevents conflicts when your application tries to bind to ports already in use by other services.

Configuration

The ports field is a simple array of port numbers (src/config.rs:14):
ports
array<number>
default:"[]"
List of port numbers to check for availability. Each port should be a number between 1 and 65535.

Format

Ports are specified as a simple YAML array:
ports:
  - 3000
  - 5432
  - 8080

Examples

Single Port

Check that a single port is available:
version: "1"

ports:
  - 3000

Multiple Ports

Check multiple ports used by your application and services:
version: "1"

ports:
  - 3000  # Application server
  - 5432  # PostgreSQL
  - 6379  # Redis
  - 8080  # Development proxy

With Comments

YAML comments help document which service uses each port:
ports:
  - 3000  # Next.js dev server
  - 5432  # PostgreSQL database
  - 6379  # Redis cache
  - 9200  # Elasticsearch
  - 5672  # RabbitMQ

Real-World Examples

version: "1"

tools:
  - name: node
    version: ">=18.0.0"
    required: true

ports:
  - 3000
  - 5432

files:
  - path: package.json
    required: true

Common Port Numbers

Here are commonly used port numbers for development:
PortService
3000Node.js/Next.js/Rails dev servers
3001Alternative Node.js port
4200Angular dev server
5000Flask default port
5173Vite dev server
5432PostgreSQL
6379Redis
8000Django dev server
8080Common HTTP alternative
8888Jupyter Notebook
9200Elasticsearch
27017MongoDB

Validation Behavior

Port checks verify that ports are available (not in use). Validation will fail if:
  • A port is already bound by another process
  • The port number is invalid (< 1 or > 65535)
  • Insufficient permissions to check the port (typically ports < 1024 require elevated privileges)
Port availability checks verify that ports are not in use. If a required service should already be running on a port, use network checks instead to verify connectivity.
Port checks are particularly useful in development environments where multiple projects or services might conflict. Run envcheck before starting your development server to catch port conflicts early.

No Port Checks

If your project doesn’t need to validate port availability, simply omit the ports section entirely:
version: "1"

tools:
  - name: go
    version: ">=1.18.0"
    required: true

files:
  - path: go.mod
    required: true
From src/config.rs:14, the ports field defaults to an empty array when not specified.