Import a stack file
This task is read-only. import-stack prints converted manifest text to
stdout. It does not write files, create state, observe Apple container,
contact registries, or pull images.
Convert
Section titled “Convert”hostwright import-stack compose.yamlhostwright import-stack compose.yaml --output jsonText mode prints the converted manifest; warnings go to stderr, so you can redirect stdout safely. JSON mode returns the manifest and structured warnings, or a validation-style error envelope on failure.
What converts
Section titled “What converts”The accepted subset is intentionally small:
- top-level
nameorproject, andservices; - service
image; commandas an inline array;environmentas a key-value map of scalars;portsas string entries like"8080:8080";volumesonly with explicit host-path sources (./data,/tmp/data);healthcheck.testonly as["CMD", ...], plushealthcheck.interval;restartas a scalar policy orrestart.policy.
Converted output still runs through Hostwright manifest validation — invalid names, missing images, unsafe ports, unsafe mounts, and plaintext credential-like environment keys fail closed.
What is rejected, on purpose
Section titled “What is rejected, on purpose”Safe review flow
Section titled “Safe review flow”hostwright import-stack compose.yaml > hostwright.yaml- Review every converted image, port, volume, environment value, health check, and restart policy yourself.
hostwright validatehostwright plan- Apply only through the explicit state path and plan-hash confirmation gate —
import-stacknever performs this step.
- hostwright.yaml reference — the target format in full.
- Plan a single service — what to do with the converted manifest.
