Expand description
Per-binary registry of stable command metadata.
The registry overlays metadata that cannot be expressed via clap
attributes onto the command tree: the stable command_id, capability
flags, and any command-specific exit codes.
Each binary owns and ships its own CommandRegistry. Entries are keyed
by the clap path excluding the binary name (e.g. ["build"] for
forge build); the binary name is implicit from the owning binary. When
no entry is found for a command, the
build_document helper fills in safe defaults: a
derived command_id (path joined by .) marked command_id_stable=false
and Capabilities::NONE marked capabilities_declared=false.
Only commands intended to be referenced by stable identifiers need to be
registered explicitly. Once a command is registered, its command_id is
considered frozen and CI uniqueness checks ensure it cannot collide.
Structs§
- Command
Meta - Per-leaf metadata that overlays the clap-derived defaults.
- Command
Registry - A binary’s command registry.
- Registry
Entry - A single registry entry.