Skip to main content

Fetch schema

defi schema --results-only
Scope to a specific command path:
defi schema "yield opportunities" --results-only
defi schema "bridge quote" --results-only

Schema model

Each node contains:
  • path
  • use
  • short
  • flags[] (name, type, usage, default, optional shorthand)
  • subcommands[]

Practical uses

  • Generate UI forms from flag metadata.
  • Validate requested flags before execution.
  • Produce autocomplete for command builders.
  • Build policy-aware execution layers with --enable-commands.

Notes

  • Hidden commands are not included.
  • Flag defaults are serialized as strings in schema output.
  • Runtime constraints (for example, mutually exclusive amount flags) still require command execution validation.