Skip to content

CLI

The esdm binary exposes five subcommands. This page documents every subcommand, its arguments, its flags, and the output it produces. The page is the canonical place to look up usage; the Getting Started chapter walks through the most common invocations in context.

Run esdm --help for the in-binary version of this overview, or esdm <subcommand> --help for a single subcommand.

esdm lint

Lints all .esdm.yaml files in a directory and reports any findings.

esdm lint [flags]

Flags

Flag Default Description
-d, --directory . Directory containing the model to lint. The linter walks it recursively.
--format human Output format: human for a readable report, json for a machine-readable stream of diagnostics.
--color auto Colorize human output: auto, always, or never. The flag is ignored for --format=json.

Exit Codes

esdm lint exits with 0 when the model is clean, and with a non-zero status when at least one finding has severity error. Findings of severity warning are reported but do not by themselves cause a non-zero exit – wrap the invocation in your CI configuration if you want warnings to fail the build.

esdm view

Renders a hierarchical summary of an ESDM model.

esdm view [path] [flags]

The optional [path] filters the rendered tree to a sub-region of the model. Path syntax follows the model hierarchy – Domain, Bounded Context, Consistency Unit – separated by slashes.

Examples

esdm view
esdm view <domain>/<bounded-context>/<aggregate>
esdm view --with-details

Flags

Flag Default Description
-d, --directory . Directory containing the model to summarize.
--with-details false Show node-level details such as schemas, invariants, and rule prose in addition to the skeleton.
--color auto Colorize output: auto, always, or never.

esdm add-schema

Writes the embedded ESDM schemas into a schemas/ directory in the current working directory. Use this once at project setup so editors with a YAML language server can offer autocomplete and validation against the schemas the linter actually uses.

esdm add-schema

add-schema refuses to run if a schemas/ directory already exists. Use update-schema to refresh an existing one.

esdm update-schema

Refreshes the local schemas/ directory to match the schemas embedded in the running binary.

esdm update-schema

update-schema rejects downgrades. If the local schema revision is newer than the binary's, the command fails rather than silently overwriting newer files with older ones. Update your binary first, then re-run the command.

esdm version

Prints the esdm version.

esdm version

The output includes the release version (or (version unavailable) for unreleased builds) and the git commit the binary was built from.