The full command list lives at the CLI reference. This page documents the model behind it: the CLI is a thin runtime dispatcher over the Cli contract projection facet, not a parallel hand-authored API.

Bootstrap and descriptor flow

  1. Parse global options and environment variables.
  2. Bootstrap status, version, and introspection locally if needed.
  3. Fetch GET /api/ContractProjection/cli with ETag caching.
  4. Longest-prefix match the command path against descriptor commands.
  5. Bind path arguments, query options, headers, and body fields.
  6. Dispatch the canonical operation over HTTP and print structured output.

Global options

Option/envMeaning
--api-base-url / VADYL_API_BASE_URLAPI base URL.
--api-key / VADYL_API_KEYService credential key.
--api-secret / VADYL_API_SECRETService credential secret.
--tenant-id / VADYL_TENANT_IDTenant scope.
--project-id / VADYL_PROJECT_IDProject scope.
--output jsonStable JSON output for scripts.

Command invocation

vadyl schema preview \
  --target production \
  --output json

Exit codes

CodeMeaning
0Success.
1Request failed with a Vadyl error envelope.
2Usage or argument binding error.
3Descriptor fetch or compatibility failure.
4Local environment or auth bootstrap failure.

JSON output contract

Script against JSON, not display strings. Errors preserve the same envelope as REST.

{
  "error": {
    "code": "VALIDATION_FAILED",
    "reasonCode": "Cli.Argument.MissingRequired",
    "message": "Missing required option --schema",
    "correlationId": "local:cli:..."
  }
}