Skip to content

Creating projects ​

dqx init builds a project from a description. Flags for the simple case, a document when there is more to say than flags carry.

From flags ​

bash
dqx init ~/projects/foodback --scaffold laravel \
  --client-name "Foodback" --php 8.5 \
  --domain foodback.test --alias app.foodback.example.test

Two domains landing in one webroot is normal: an alias is a whole domain, and it reaches both the router's rule and the certificate.

From a document ​

Several sites, per-site aliases, a chosen container prefix — that is where flags stop being the right shape:

yaml
clientName: Zorgpad
layout: multi
php: "8.4"
scaffold: my-house-recipe
services: [db, redis, mailpit]
sites:
  - domains:
      primary: api.zorgpad.test
      aliases: [zorgpad.test]
    repository: zorgpad-api
    publicDir: public
bash
dqx init ~/projects/zorgpad --from zorgpad.yml

The document is the .dq/config.yml shape, so there is nothing extra to learn. A flag wins over the same key in it.

What it decides, and what it will not ​

Everything it filled in is reported with its reason:

scaffold.chain laravel:13 → my-house-recipe
services       db, mailpit, redis  (the `my-house-recipe` scaffold sets it)
clientKey      zorgpad  (derived from `Zorgpad`)
image          dolphiq/php84-composer-npm:2  (dqx runs PHP 8.4 on it)

And what it will not guess, it asks:

needed  sites.api.zorgpad.test.repository
        Which repository is checked out for api.zorgpad.test? A multi-layout project clones one per site.

A container prefix derived from the name is an assumption dqx is happy to state. A prefix that collides with a project already on the machine is a question, because two projects sharing one is a class of confusion that takes an afternoon to find.

Scaffolds ​

--scaffold laravel means dqx creates the application too, not only the environment around it. Recipes are data: they can extend one another, propose defaults, and run commands at two moments — before dqx writes .env, and after, with the database reachable.

dqx_scaffolds over MCP, or the scaffolds reference, lists what this machine knows. A machine or a project can add its own.

Adopting instead ​

If the project already exists, adopt it rather than recreating it.

dqx v1.1.0