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.4.0.tar.gz (36.0 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.4.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dx_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 36.0 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.4.0.tar.gz
Algorithm Hash digest
SHA256 11ff9f5cc29e2ed7e32e554a93ffd67b01d87b4476fc6edbf7fd26968e0751cb
MD5 4fae179414824e356d7f839b172849cd
BLAKE2b-256 c6965ec7e7d83ec1dc349bc115cf50ba65dcaf0de7b894379e6e9fffe0c9a67f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dx_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0979ef0eae371682517919c97e0b5f866f9f1d811d8f5166ed7bc5c066f9430
MD5 c12858c67a432b4d1a761c24ae98cdf0
BLAKE2b-256 00922dc87d75dccb81b2183312ce133b2474d52d4584379bee2fe2259d6ef625

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