YAML Compatibility
A Launchfile is standard YAML 1.2. All YAML features work, and no custom tags are used. See DESIGN.md D-22 for why YAML was chosen.
Arrays don't need extra indentation
The - can sit at the same column as the key. Both forms are valid:
# Indented (common style)
requires:
- postgres
- redis
# Flush (equally valid, more compact)
requires:
- postgres
- redis
# Inline (shortest)
requires: [postgres, redis]Anchors, aliases, and merge keys
Use &name to define a reusable block, *name to reference it, and <<: to merge it into a map:
x-shared: &shared
runtime: node
build: .
health: /health
env:
LOG_LEVEL: "info"
components:
api:
<<: *shared
commands:
start: "node api.js"
provides:
- protocol: http
port: 3000
worker:
<<: *shared
commands:
start: "node worker.js"
env:
LOG_LEVEL: "debug" # overrides the shared valueThe x- prefix is a convention for extension fields that parsers ignore. Merged values can be overridden by declaring the same key after the merge.
Copy semantics: YAML aliases (
*name) are resolved to deep copies by the parser — they are not live references. If an anchored block contains agenerator: secretdefinition, each alias produces a separate generated value. For values that must be shared across components, use the$secrets.<name>expression system instead of YAML anchors.
Block scalars for multi-line text
Use | (literal) to preserve newlines, or > (folded) to join lines:
commands:
release: |
npx prisma migrate deploy
npx prisma db seed
echo "Release complete"
description: >
A multi-component web application with
a REST API, background workers, and
a static frontend.JSON is valid YAML
Any YAML 1.2 parser accepts JSON. If you prefer braces and quotes:
{
"name": "my-app",
"runtime": "node",
"requires": ["postgres", "redis"],
"commands": { "start": "node server.js" },
"health": "/healthz"
}This parses identically to the YAML equivalent. You can also mix styles — JSON inline for short values, YAML block for complex structures.