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 dx-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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dx_cli-0.4.1.tar.gz.
File metadata
- Download URL: dx_cli-0.4.1.tar.gz
- Upload date:
- Size: 49.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f4285df16cd7344f75c4b6d68795be9d9e7b4bd5b23425d27380354108c6395
|
|
| MD5 |
268ebbd786c398c3ffdc3a14536cd12d
|
|
| BLAKE2b-256 |
e11c334b6b1f1b402769a893cfb78b916c3b818bf9a6f2d09db7fccfca376fca
|
File details
Details for the file dx_cli-0.4.1-py3-none-any.whl.
File metadata
- Download URL: dx_cli-0.4.1-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7ac24fb4190122afd36168df23e84dac0e11c1c93da0e8b4e3269da8b8422b8
|
|
| MD5 |
7c78a55ae90fd70c64ef65125839240d
|
|
| BLAKE2b-256 |
f2cd6e1004420d826ac4663592c658ebb74d5f0dac90744d3c0da6ae1d7cdd2b
|