Skip to content

CLI

This page documents the CLI for disdantic.

disdantic

Disdantic: The missing polymorphic engine for Pydantic.

Usage:

$ disdantic [OPTIONS] COMMAND [ARGS]...

Options:

  • -v, --version: Show the application version and exit.
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • diagnose: Scans all configured auto-discovery...
  • schema: Generates the schema for the specified...
  • list: List active registries and their...

disdantic diagnose

Scans all configured auto-discovery packages, identifies all subclass registries,

and verifies their integrity and compilation health.

Usage:

$ disdantic diagnose [OPTIONS]

Options:

  • -p, --path TEXT: Project root directory (defaults to current working directory).
  • --json: Output result as a raw JSON string for scripts.
  • --help: Show this message and exit.

disdantic schema

Generates the schema for the specified registry base class.

Usage:

$ disdantic schema [OPTIONS] REGISTRY_PATH

Arguments:

  • REGISTRY_PATH: The dot-path to the registry class (e.g. my_package.models.BaseMessage). [required]

Options:

  • -o, --output PATH: Save schema directly to the specified file (defaults to stdout).
  • -f, --format [json|openapi]: Schema target format. [default: json]
  • --indent INTEGER: Pretty-print indentation level. [default: 2]
  • --help: Show this message and exit.

disdantic list

List active registries and their registered classes.

Usage:

$ disdantic list [OPTIONS]

Options:

  • --json: Output as raw JSON representation.
  • --help: Show this message and exit.