CLI Example#
The CLI exposes validation, replay, and lowering commands. Installed packages
provide dogwood as the preferred command and dogwood-py as a
backward-compatible alias:
dogwood validate policy.dw --policy-schema schema.cedarschema
dogwood replay policy.dw --policy-schema schema.cedarschema --trace trace.log
dogwood lower policy.dw --policy-schema schema.cedarschema
With an explicit Dogwood event schema:
dogwood replay policy.dw \
--policy-schema schema.cedarschema \
--event-schema event.dwschema \
--trace trace.log
When using the local virtualenv directly:
.venv/bin/dogwood validate policy.dw --policy-schema schema.cedarschema
Run the packaged CLI example:
python -m examples.cli
The equivalent command from a source checkout is:
dogwood replay examples/cli/policy.dw \
--policy-schema examples/cli/schema.cedarschema \
--trace examples/cli/trace.log
Expected output:
@0 (time point 0): true
@1 (time point 1): false