Command-line Interface
The weltenwanderer CLI validates .ddd files and generates executable code for target platforms.
Installation
The CLI is included in the @weltenwanderer/cli package. After building the monorepo, the binary is available as weltenwanderer.
Commands
validate
Validates one or more .ddd files against all compiler checks.
weltenwanderer validate <pattern...>Arguments:
| Argument | Description |
|---|---|
pattern... | One or more glob patterns matching .ddd files (e.g. "src/**/*.ddd"). At least one pattern is required. |
Example:
weltenwanderer validate "examples/**/*.ddd"weltenwanderer validate registration.ddd checkout.dddOutput:
Each file is reported on its own line, prefixed with a check mark on success or a cross on failure. Errors include the source position in line:column format followed by the error message.
✓ examples/minimal/registration.ddd✗ examples/broken/checkout.ddd 12:5 Mismatched input 'event' expecting '}' 24:1 Command 'PlaceOrder' has no decide clausegenerate
Generates TypeScript/Emmett code from a single .ddd file.
weltenwanderer generate <file.ddd> [options]Options:
| Option | Default | Description |
|---|---|---|
--target <target> | emmett | Target platform. Currently only emmett is supported. |
--output <dir> | src/generated | Output directory for generated files. |
Example:
weltenwanderer generate registration.dddweltenwanderer generate registration.ddd --target emmett --output dist/generatedThe file is parsed and validated before generation. If parse or validation errors are found, the command prints diagnostics and exits with code 1 without generating any files.
On success, the command creates the output directory structure and reports the number of generated files:
✓ Generated 7 files to src/generatedExit codes
| Code | Meaning |
|---|---|
0 | All files passed validation |
1 | One or more files failed validation, or no files matched the given patterns, or an unknown subcommand was provided |
2 | Unexpected runtime error |
Error output format
Errors are written to stdout, one per line, indented two spaces beneath the failing file path:
<line>:<column> <message>Parser errors and diagnostic errors (severity: error) are both reported. Warnings are not reported.