Skip to main content

Developer experience CLI for Docker Compose monorepos — service scaffolding, port management, and project health checks

Project description

dx — Developer Experience CLI

A zero-dependency CLI for managing Docker Compose monorepos. Handles service lifecycle, port management, code generation, and project health checks.

Install

pip install dx-cli

Or install from source:

pip install -e dev-cli/

Quick Start

dx up                     # Start all services
dx dev                    # Start with hot-reload
dx down                   # Stop everything
dx ps                     # Show running containers
dx logs service-data      # Stream logs

Commands

Docker Lifecycle

Command Description
dx up [targets...] Start services (prod mode)
dx dev [targets...] Start services (dev mode + hot-reload)
dx down [targets...] Stop and remove containers
dx restart [targets...] Restart containers
dx reset [targets...] Stop + wipe volumes
dx ps Show running containers
dx logs [targets...] Stream container logs
dx pull [targets...] Pull images
dx reload <service> Recompile Java service for DevTools restart

Build / Test / Lint

Command Description
dx build [targets...] Build services (all, common, or names)
dx test [targets...] Run tests (all or service names)
dx lint [targets...] Run linters (all, frontend, python)

Service Scaffolding

Command Description
dx generate python <name> Scaffold a new Python/FastAPI service
dx generate java <name> Scaffold a new Java/Spring Boot service

Generated services include Dockerfiles, compose entries, health checks, config, and agent guides.

Port Management

Command Description
dx ports Show port assignments
dx ports pin <svc> <port> Pin a service to a specific port
dx ports reset [service] Clear port reservations

Ports are auto-allocated for all services (infra, services, apps) and persisted in .dx/ports.json.

Project Health

Command Description
dx doctor Check project structure, Dockerfiles, and conventions
dx doctor --fix Auto-fix issues in compose files and Dockerfiles

Checks include:

  • Compose service naming conventions
  • Required files per service type (Dockerfile, pom.xml, pyproject.toml)
  • Java Dockerfile module sync with pom.xml
  • Hardcoded ports (auto-fixable)
  • Missing Dockerfile references

Proxy & DNS

Command Description
dx proxy start Start reverse proxy on :7355
dx proxy stop Stop reverse proxy
dx hosts setup Add *.dx.localhost DNS entries

Access services at http://<service>.dx.localhost:7355.

Target Resolution

Targets can be:

  • Group names: infra, services, apps
  • Service names: service-data, infra-postgres
  • Shorthand: data, ai, frontend
  • Glob patterns: service-d*, app-*-ui

Compose File Convention

docker-compose.infra.yml          # Infrastructure (prefix: infra-*)
docker-compose.services.yml       # Backend services (prefix: service-*)
docker-compose.apps.yml           # Frontend apps (prefix: app-*)
docker-compose.dev.services.yml   # Dev overlay for services
docker-compose.dev.apps.yml       # Dev overlay for apps

Requirements

  • Python 3.11+
  • Docker with Compose v2
  • No Python dependencies (zero-dependency CLI)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dx_cli-0.2.0.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dx_cli-0.2.0-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file dx_cli-0.2.0.tar.gz.

File metadata

  • Download URL: dx_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for dx_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1e42fb0bb64b9d02043cb853d5cf7434602ea32ad6bf663db2c1e78257e4f186
MD5 c22b0cadaa6779c28bbb73d51b8cca36
BLAKE2b-256 1dbd920eaddc71b10b8d59a592a1e95e1ccd01f51e973701b941695187f5b713

See more details on using hashes here.

File details

Details for the file dx_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dx_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for dx_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc76ab0e04ce670a3195b5f0a32c6bcf437c0fb050887b63c0ea51cd6acdeb87
MD5 a91c5a6a54d462aee93291d298566fc4
BLAKE2b-256 92a0821c70ed93c3710ed42bbe39605e15fd9ea92282d8d1c3b1b16acb78c5ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page