-
Notifications
You must be signed in to change notification settings - Fork 10
CLI
SANKET SARKAR edited this page Dec 22, 2025
·
1 revision
The reference CLI is provided by the crml-engine package.
Install / setup:
Quick check:
crml --helpValidates a CRML document (schema + semantic checks). This delegates to the crml_lang validator.
crml validate examples/scenarios/scenario-phishing.yamlIf you have the language tooling installed separately, you can also call the validator directly:
crml-lang validate examples/scenarios/scenario-phishing.yamlRuns a Monte Carlo simulation using the reference engine.
Supported inputs:
crml_portfolio_bundle: "1.0"
Important:
- Raw scenarios (
crml_scenario) and portfolios (crml_portfolio) are not executable by the reference runtime. Create acrml_portfolio_bundlefirst (e.g. viacrml bundle-portfolio).
Examples:
# Portfolio bundle (executable)
crml simulate examples/portfolio_bundles/portfolio-bundle-documented.yaml --runs 10000
# JSON output
crml simulate examples/portfolio_bundles/portfolio-bundle-documented.yaml --runs 20000 --format json > result.jsonOptions:
-
-n, --runs: number of runs (default: 10000) -
-f, --format:textorjson -
--fx-config: path to an FX config YAML document
Important:
-
--seedis currently accepted by the CLI but is not wired through to the simulation wrapper yet. Do not rely on it for reproducibility.
Renders a human-readable explanation of a CRML document.
crml explain examples/scenarios/scenario-phishing.yaml-
0: success -
1: validation failure, simulation failure, or parse error