Runnable examples
These examples are small projects you can operate, not isolated configuration fragments. They live under examples/ and use only a shell and Python 3. They do not contact external hosts, require credentials, or modify anything outside their own directory.
Start from the repository root after building or installing Kranz.
MoonFlight showcaseThe whole model in one project: infrastructure, migration, APIs, gateway, workers.Procfile quickstartThree commands, no YAML. Learn the interface and environment loading.Native YAMLDependencies, a one-shot setup, readiness, and runtime ports.Detached lifecycleStart, stop, observe, and reconnect external resources safely.PrerequisitesMigrations and setup that must finish before a service starts.Process ComposeOpen an existing compatible configuration directly.Full dependency graphTwo APIs, a gateway, a worker, health gates, and recovery.Runtime portsSee how Kranz discovers listeners from processes and children.
Which example should I choose?
| If you want to learn… | Use |
|---|---|
| How everything fits together in one project | MoonFlight |
| The keyboard and basic service lifecycle | Procfile |
How a real kranz.yaml is structured | Native YAML |
| Docker/SSH-style resources that survive Kranz | Detached lifecycle |
| Work that must succeed before a service starts | Prerequisites |
| Whether your existing Process Compose file works | Process Compose |
| Dependency fan-out, fan-in, health, and recovery | Full stack |
| Declared, detected, stale, and dynamic ports | Runtime ports |
Safe by construction
The lifecycle playground simulates external resources with ignored marker files. The other examples open documented localhost ports only. Each page includes its cleanup instructions.