Skip to main content

qx-cli

Scaffolding, code generation, and local-dev orchestration for the Qx framework. Invoked as qx once installed, or uv run qx during development.

What lives here

  • qx new service NAME — scaffold a complete new Qx service: directory structure, pyproject.toml, DI bootstrap, FastAPI app factory, Alembic config, Docker Compose overrides, and a README.md.
  • qx generate aggregate NAME — add a domain aggregate with Entity, events, and a stub repository to an existing service.
  • qx generate command NAME — add a Command and handler class with the standard boilerplate.
  • qx generate query NAME — add a Query and handler class.
  • qx generate endpoint — add a FastAPI route file wired to the Mediator.
  • qx generate event NAME — add an IntegrationEvent and its handler skeleton.
  • qx dev up — start the local Docker Compose stack (Postgres, Redis, NATS, Prometheus, Tempo, Grafana, MailHog, MinIO).
  • qx dev down — stop and remove the local stack.
  • qx version — print the framework version.

Usage

# Install (or use via uv in the workspace)
pip install qx-cli

# Scaffold a new service
qx new service payments-service
cd payments-service

# Add domain objects
qx generate aggregate Payment
qx generate command ProcessPayment
qx generate query GetPayment
qx generate event PaymentProcessed

# Start local infra
qx dev up

# Run
uv run uvicorn payments_service.main:app --reload

Generated structure

qx new service produces:

my-service/
├── src/my_service/
│   ├── domain/aggregates/        # domain model
│   ├── application/
│   │   ├── commands/             # command handlers
│   │   └── queries/              # query handlers
│   ├── infrastructure/
│   │   └── persistence/          # repositories, SA mapping
│   └── presentation/routes/      # FastAPI routes
├── tests/
│   ├── unit/
│   └── integration/
├── alembic/
├── pyproject.toml
└── README.md

Design rules

  • Generated code follows the same conventions as examples/identity-service — it is the canonical reference for what the generator should produce.
  • qx dev up/down is a thin wrapper around docker compose pointing at deploy/docker-compose.yaml in the workspace root. It does not manage application containers, only infrastructure.

Metadata

Release files for qx-cli 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qx-cli 1.1.2
File Size Uploaded Provenance Actions
qx_cli-1.1.2.tar.gz 30.8 kB Without provenance Details for qx_cli-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qx-cli 1.1.2
File Interpreter ABI Platform Actions
qx_cli-1.1.2-py3-none-any.whl Python 3 none any Details for qx_cli-1.1.2-py3-none-any.whl

Total release size: 100.5 kB

Release files / qx_cli-1.1.2.tar.gz

Download URL qx_cli-1.1.2.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f008c9d61e84b430285a4856e37a0db532999ea2e5ab8af6435abdb00038ef93
BLAKE2b-256 checksum
How to use checksums
aa7a7d66024b2a3129bfcc821a2748cdad94a51a97c794ea1323d393464723c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / qx_cli-1.1.2-py3-none-any.whl

Download URL qx_cli-1.1.2-py3-none-any.whl
Size 69.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8255a4c6397f55e011118cf19c271b6e5714a8bf079b60c7c831a1a0966aa766
BLAKE2b-256 checksum
How to use checksums
5829a943a73a66e03b58486b19c226eadf043d70ef926e4ec1699a7d697745bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for qx-cli 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page