CLI
Every command works headlessly: clean exit codes, line-structured output when piped, and no interactive prompt that traps automation. Run alzo <command> --help for a command's syntax, effects, options and examples, and alzo --help for the full list. There is no shell completion.
Commands
alzo setup install Alzo's local root into this machine's trust store
alzo up [target…] evaluate, allocate, start — blocks
alzo down remove this instance
alzo plan --down --orphans preview scoped orphan cleanup
alzo down --orphans apply scoped orphan cleanup
alzo rebind preserve the environment after a same-filesystem move
alzo plan previews startup without changing the port cache
alzo ci [target…] [-- <cmd>] up with CI semantics, then run <cmd> and tear down
alzo status [node…] node states
alzo traces [node…] recent traces with dashboard waterfall links
alzo logs [node…] stream or tail
alzo restart <node…> restart through the running owner; dependents unchanged
alzo reload validate and replace the live owner's complete graph
alzo cancel [node…] abort a running build or task; bare, everything in flight
alzo stop [node…] stop without removing; bare stops the owner
alzo start <node…> start through the running graph owner
alzo run <task|command> run against a graph whose dependencies are ready
alzo exec <node> -- … run a command in a node
alzo check type-check the configuration and validate the graph
alzo profiles list profiles without constructing a graph
alzo instances every instance in this workspace
alzo doctor diagnose Docker, certificates, DNS, port availability
alzo mcp expose six bounded agent tools over stdioThe owner is the process alzo up starts to supervise the environment. Commands such as restart, start, reload and run work through a running owner rather than starting a second one. Everyday development shows the lifecycle commands in order.
upevaluates the configuration, allocates ports and starts the graph, then blocks; Ctrl-C stops the processes and keeps volumes.--wait, or its alias--detach, moves supervision to the background and returns once everything has settled. In a foreground terminal,interactive: truehost processes are selectable withj/kor the arrow keys, andior Enter attaches to one.downrunsteardown, then removes the instance's containers and networks, and its named volumes unless they haveonRemove: 'retain'. Retained volumes are named in the report. It takes no node targets; usestop <node>to stop one node.planprints the startup actions in order, each node's readiness policy and the build edges Alzo inferred. Its ports and hostname labels are provisional, so read actual endpoints fromstatus --json.statusis the canonical machine-readable view of the graph: lifecycle, health and build state per node, dependency edges and failure chains, resolved environment and recent health history. Values read throughsecret()are redacted.logsreads retained logs, or follows them with--follow.--taildefaults to the newest 1,000 matching lines, and--sinceaccepts a timestamp or an age such as10m. It also works after the owner stops.cancelaborts a running build or task, and records it as cancelled rather than failed. With no target it cancels everything in flight; a node with nothing in flight exits 0.runruns a task, or a command a node declares, once its dependencies have reached their declared conditions; it refuses, naming the ones that have not. Arguments after--are appended to the command. A command name that two nodes declare is ambiguous; qualify it asnode:command.execruns a command in a node's container, or in a host process's working directory and environment.doctorchecks the local Docker daemon, ports and workspace, plus DNS and certificate trust for the ingress domains a configuration uses.
Options that a command does not use are refused, with exit code 2 and a pointer to its help, before anything is evaluated or changed. --config, --help, --json, --profile and --instance are accepted everywhere, and anything after -- belongs to the child command. Parameters a configuration declares add their own flags, as Secrets and parameters describes.
Targets
Targets may be nodes or groups, and a target's dependency closure is included by default:
alzo up services the group, plus everything it depends on
alzo up api --only api alone; fails if its dependencies are not running
alzo restart ...api api and everything downstream of italzo up services without its databases would be a request that cannot be satisfied, so the closure is the default and --only opts out of it. A start: 'manual' node inside a requested closure does run. Alzo announces what it is about to start beyond what you named:
$ alzo up services
services api, apiWorker, webApp
+ required packages, db, redis, temporal, migrate (5, incl. 1 manual: migrate)
✓ satisfied db already running in this instanceWith a running owner, alzo up api --only starts the selected nodes through it and requires every omitted dependency to have reached its declared condition; it never starts an omitted dependency. A cold start whose selection leaves out a required dependency is refused.
...api is the deliberate cascade. Alzo does not restart dependents automatically — a dependency restarting keeps its address, so there is usually nothing for a dependent to do — but when you have changed a shared contract, this is how you say so. Lifecycle commands such as restart, stop and start act on exactly the nodes you name, unless you cascade; a sidecar group always acts as one unit.
--containerize <node> runs a node that declares both an image and a local process from its image for this run, as Provisioning describes.
Reloading the configuration
Editing alzo.config.ts marks the running owner as config changed in both the terminal and the dashboard; it does not change processes implicitly. alzo reload type-checks the configuration exactly as alzo check does, evaluates it, and replaces the whole graph under the same owner, while the current graph stays live until the new one is accepted. A type error is rejected with exit code 2, and a compiler that cannot complete with exit code 3; neither stops the running graph. Reloading an unchanged, complete configuration does nothing.
A valid configuration replaces the whole graph under the same supervisor, keeping its dashboard, telemetry, retained logs, profile, parameters and port block. This is a complete replacement, not field-by-field hot patching.
Reload reapplies the original up selection. If you began with alzo up db --wait and then added an API, alzo reload loads its definition but still starts only the database and its dependencies; run alzo start api once its dependencies are ready. Later start and stop commands do not change that original selection. After an alzo up --wait without targets, reload instead selects every auto-start node of the new configuration, including newly added ones.
Machine-readable output
Every command accepts --json. Attached to a terminal you get a status view; piped, you get one structured record per line. The two are renderings of the same event stream and never disagree about what happened. Each record says what it is, so a script or an agent can branch on it without parsing text.
alzo up --wait --json returns a snapshot of the settled graph, including its readiness timing and endpoints. In status --json, each endpoint's speaksHttp is true only where Alzo knows the port speaks HTTP: an ingress route, or a port an http readiness probe checks. For any other port, such as PostgreSQL's, use just the host and port.
Exit codes
| Exit | Meaning |
|---|---|
0 | Everything reached its goal state. alzo up blocks, so for it this means settled with no failures, then signalled — readiness itself is the up.settled record |
1 | A node failed; the graph may still be running |
2 | Invalid command usage or configuration |
3 | Environment problem — Docker down, port block unavailable |
Distinguishing 2 and 3 from 1 matters in CI, where a configuration error and a flaky service want different responses.
Orphan cleanup
Deleting a worktree or a node declaration leaves its Docker objects behind. Run alzo plan --down --orphans first: it lists the exact containers and volumes that belong to nodes no longer in the selected checkout's graph, with each removal or retention decision, and changes nothing. Then apply it with alzo down --orphans, using the same profile and flags. Applying asks for confirmation in a terminal and needs -y elsewhere; declining exits with code 2. The owner must be stopped. Cleanup leaves declared nodes and shared objects alone, honours each volume's retention policy, and cannot run orphans' teardown callbacks.
For a checkout that no longer exists, add --orphan-scope w:<key> from another worktree of the same workspace. The key is the instance field of alzo instances --json, or the Docker object's alzo.instance label. For a whole workspace whose checkouts are all gone, use --orphan-scope workspace:<hash> from anywhere, with its alzo.workspace label. This removes the scope's containers and networks but keeps its named volumes, because a missing path can be a disconnected drive. It also releases the task reservation that an alzo run or another task or lifecycle operation left on the instance when it ended without proving its cleanup, once the scope's containers are gone and the Docker daemon that ran the checkout lists none of the instance's containers. A task container that is still running refuses the cleanup instead, with docker stop as the remedy. A checkout that was moved rather than deleted should be rebound from its new path instead.
Add --release-ports to preview or apply retiring the selected checkout's reservation, which returns its port block to the pool. This covers the declared nodes of a stopped checkout as well as its orphans: their stopped containers and networks are removed. It keeps all named volumes, even those whose usual policy is removal, and releases the ports only after that cleanup succeeds; the checkout's identity and hostname label stay available. It releases a task reservation the same way an unavailable checkout's cleanup does. Select the Docker daemon that ran the checkout, because a different daemon is refused. A later start tries the same block again and reports a move if it has to use another.