stado registry push
Invocation
stado registry push [OPTIONS] [PATH]Purpose
Upload local registry.json to the canonical registry object. With --if-generation the write is conditional on the generation the document was read at: a registry that has moved since is refused with exit 75 and, under --json, a `stado.registry-push-receipt.v1` object whose state is "conflict" and which names both generations. Exit 75 means only that, so a reconcile loop can re-pull, re-apply and push again; a storage or validation failure stays exit 1.
Required inputs and options
| Input or option | Contract |
|---|---|
[PATH] | The document to upload, or `-` to read it from stdin. With neither, the repository's bundled registry is uploaded - which is what erased the canonical document on 2026-09-01 when a caller piped a body this command never reads |
--if-generation <IF_GENERATION> | Refuse the write unless the canonical registry is still at this generation. Take the token from `registry pull --generation-only` or `--with-generation`; a stale one exits 75 |
--force | Allow a write that deletes a top-level key the canonical document still carries. Without this the upload is refused and names them. It does NOT allow a write that erases every target |
--allow-empty-fleet | Allow a write that leaves the registry with no targets at all. Separate from --force on purpose: every other guard asks whether a deletion was meant, and this one asks whether the document is a fleet at all |
--json | Emit a `stado.registry-push-receipt.v1` object instead of the sentence, for both the write and the refusal |
Output and state effect
It performs the operation described above and emits its operator result on standard output or standard error. Any state change is limited to the resources and records named by the purpose and options on this page.
Refusals
- Refuse the write unless the canonical registry is still at this generation.
- Without this the upload is refused and names them.
- Emit a `stado.registry-push-receipt.v1` object instead of the sentence, for both the write and the refusal
- Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.