Skip to main content

Module cli_contract

Module cli_contract 

Source
Expand description

Shared CLI output contract glue for the five api-* binaries.

All five api-rest / api-gql / api-grpc / api-websocket / api-test binaries route their output through this module so the JSON envelope and exit codes stay aligned with nils_common::cli_contract. Each binary’s tests still pin the literal schema_version per subcommand; this module intentionally adds no new schema versions of its own.

Modules§

exit
BSD sysexits-aligned exit-code constants used by every workspace binary.

Structs§

Envelope
Envelope shared by every JSON-emitting subcommand.
EnvelopeError
Structured error rendered inside the JSON envelope’s error field.

Enums§

OutputFormat
Canonical output-format flag value for every workspace CLI.

Functions§

emit_parse_error
Emit a parse-error / unknown-subcommand failure through the shared contract.
handle_parse_error
Route a clap parse error through the shared output contract.
schema_version_for
Build the canonical cli.<binary>.<command>.v<N> schema-version string.