Morphir command-line application
mise use 'github:finos/morphir-moonbit[prerelease=true,bin_path=bin]@0.1.0-demo.1'
mise exec -- morphir --help[tools."github:finos/morphir-moonbit"]
version = "0.1.0-demo.1"
prerelease = true
asset_pattern = "morphir-moonbit-0.1.0-demo.1-macos-arm64.zip"
bin_path = "bin"
checksum = "sha256:a04771ea6ff98d2ee93c62fa8a717f2db330d04ddacc1496db86389e68806206"mise install
mise exec -- morphir version --json
mise exec -- morphir --help
mise exec -- morphir worksheet demo.scm --isolated --discovery-boundary . --jsonmise exec -- moon updatemise exec -- moon run apps/morphir --target native -- run path/to/workspace --all
mise exec -- moon run apps/morphir/node --target js -- workspace path/to/workspace --jsonmise exec -- moon build apps/morphir --target native --release
./_build/native/release/build/finos/morphir/morphir.exe run path/to/workspace --allmoon install finos/morphir@0.1.0 --bin ./morphir-bin
./morphir-bin/morphir --help
./morphir-bin/morphir version --jsonmoonx finos/morphir/moonx@0.1.0 --help
moonx finos/morphir/moonx@0.1.0 version --json
moonx finos/morphir/moonx@0.1.0 worksheet demo.scm --json| Control | Meaning |
|---|---|
| --moonx-help | Show launcher help, without starting Node |
| --moonx-json | Select JSON for launcher help or startup errors |
| --json | Select launcher JSON and forward this same argument to Morphir |
| --moonx-forward | Forward every following value literally, including launcher-looking controls |
mise exec -- bun run --cwd apps/morphir build
node apps/morphir/bin/morphir.js --help
node apps/morphir/bin/morphir.js run path/to/workspace --allmorphir compile path/to/project --language moonbit --provider finos/morphir-moonbit-frontend --profile moonbit-model-stable-v1 --json
morphir compile path/to/elm-project --language elm --provider finos/morphir-elm --profile library-origins --jsonmise exec -- moon build apps/morphir/embedded --target wasm --release
node pkgs/morphir-host/runners/wasm.mjs \
_build/wasm/release/build/finos/morphir/embedded/embedded.wasm run path/to/workspace --allmorphir workspace [path] --json
morphir project list [path]
morphir project list [path] --frontend scheme --target ir-json --json
morphir project list [path] --target scheme --target ir-json --json-lines
morphir run [path] --project Core
morphir run [path] --project packages/core
morphir run [path] --all
morphir run path/to/file.scm --file
morphir run path/to/source-directory --directory
morphir run [path] --config-script transforms.scm --backend scheme
morphir run [path] --dry-runmorphir project list --json --log-level trace
morphir project list --help --json --log-level debug[logging]
level = "debug"
[logging.file]
enabled = true
format = "json-lines"{
"properties": {"path": "/repo/app/morphir.toml", "command": "project.list"},
"duplicateProperties": {"path": ["/repo/morphir.toml", "/repo/app/morphir.toml"]}
}morphir --json project list . --frontend scheme
morphir workspace . --json-lines
morphir run . --all --json-lines
morphir run . --dry-run --json-lines
morphir project list --help --json| Command | JSON Lines record types |
|---|---|
| Help | help |
| workspace | workspace metadata, then project entries |
| project list | project entries, diagnostic entries, then a result summary |
| run --dry-run | frontend and boundary selections, source and destination paths, then a plan summary |
| run | frontend, boundary, accepted, diagnostic, artifact and committed entries, then a result summary |
| Invocation or configuration failure | error |
[workspace]
members = ["packages/*"]
exclude = ["packages/experimental"]
default_member = "packages/core"
out_dir = ".morphir/out"
[frontend]
language = "scheme"
[ir]
format_version = 4[project]
name = "Core"
source_directory = "src"{"project":{"name":"Shop"},"pipeline":{"backend":"scala"},"profiles":{"default":["metrics"]}}pipeline.backend = "javascript"morphir project list --json --profiles metrics
morphir project list --json --no-profiles
morphir project list --json --isolated --discovery-boundary . --profiles metrics
morphir project list --help --json --profiles metricsmorphir workspace init
morphir project add packages/quotes --name Quotes --language scheme
morphir project add packages/pricing --name Pricing --language scheme
morphir run
morphir run --project packages/quotes
morphir project remove packages/pricing[project]
name = "Pricing"
source_directory = "src"
module_prefix = "App"
[frontend]
language = "moonbit"
[pipeline]
backend = "checkpoint"morphir run . --dry-run --json
morphir run . --json-lines
morphir run . --backend moonbit --validation source-only --json[frontend]
language = "moonbit"
provider = "finos/morphir-moonbit-frontend" # optional when there is one provider
profile = "moonbit-model-stable-v1"morphir run . --frontend moonbit --frontend-profile moonbit-model-stable-v1 --dry-run
morphir run . --frontend-provider finos/morphir-moonbit-frontend --frontend-profile moonbit-model-stable-v1 --jsonmorphir run path/to/elm-projectmorphir run path/to/elm-project --backend moonbit --validation source-only[project]
name = "Pricing"
source_directory = "src"
[frontend]
language = "ir-json"
[pipeline]
backend = "checkpoint"
checkpoint_format = "ion-binary"morphir run . --frontend ir-json --backend checkpoint --json
morphir run . --frontend ion-binary --backend checkpoint --checkpoint-format ion-text
morphir run . --frontend ion-text --backend checkpoint --checkpoint-format morphir-jsonmorphir run . --log --json
morphir run . --log --log-format ion-text
morphir run . --log-file /chosen/path/frontend.jsonl --log-format json-linesmise run test:climorphir toolchain info --json
morphir toolchain setup --yes --json-lines
morphir toolchain build ./project --target wasm --json
morphir toolchain run ./project --package main --target wasm --json -- argument
morphir toolchain exec ./script.mbtx --jsonmorphir run . --frontend ir-json --backend moonbit --validation source-onlymorphir run . --frontend ir-json --backend moonbit --target native \
--build-provider process --build-helper /path/to/library-build.mjs \
--home /path/to/moonbit --sdk /path/to/morphir-sdkmorphir eval model.json --suite calls.json --json
morphir eval model.yaml --suite calls.ion --suite-format ion-text \
--checking-policy permissive --provider scheme --json-lines
cat model.json | morphir eval - --model-format json --suite calls.json --json
morphir worksheet worksheet.scm --json
cat worksheet.scm | morphir worksheet - --source-id example --source-revision 1 --json-lines{"profile":"morphir-invocations-v1","calls":[{"id":"answer","entry":"example:main#answer","arguments":[]}]}| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | Compilation, execution or publication failure |
| 2 | Invalid invocation or configuration |
| 130 | SIGINT, cancel file or host cancellation |
| 131 | Delivered Quit, including POSIX SIGQUIT or Windows Node SIGBREAK |
| 143 | SIGTERM |
morphir notebook export worksheet.scm -o sheet.ipynb --evaluate --json
morphir notebook export worksheet.scm --format dib -o sheet.dib --json
morphir notebook import sheet.ipynb -o restored.scm --jsonmorphir model inspect model.yaml --json
morphir model inspect path/to/yaml-tree --json
morphir model export-original model.ionb --output saved --json
cat model.yaml | morphir model export-original - --model-format yaml \
--filename model.yaml --output saved --jsonmorphir generate model.yaml --output generated --json
morphir generate checkpoint.ion --target moonbit --output generated --json
morphir generate model.json --target elm --output generated --jsonmorphir verify model.json --suite calls.ion \
--execution-helper /path/to/@morphir/morphir/build-provider/execution.mjs \
--home /path/to/pinned/moon-home \
--dependency finos/morphir-sdk=/path/to/morphir-sdk \
--dependency finos/morphir-execution=/path/to/morphir-execution \
--dependency moonrockz/ion=/path/to/ion \
--dependency moonbitlang/x=/path/to/x \
--dependency moonbitlang/async=/path/to/async \
--log-file execution.ionb --jsonmise exec -- bun install --frozen-lockfile
mise exec -- bun run build:runtimes
mise run setup:core
MOON_HOME=/path/to/pinned/moon-home mise exec -- node apps/morphir/scripts/test-execution.tsmorphir conform model.json --cases cases.ion \
--execution-helper /path/to/build-provider/execution.mjs --home /pinned/moon-home \
--dependency finos/morphir-sdk=/path/to/sdk \
--dependency finos/morphir-execution=/path/to/execution \
--dependency moonrockz/ion=/path/to/ion \
--dependency moonbitlang/x=/path/to/x \
--dependency moonbitlang/async=/path/to/async \
--receipt conformance.ionb --jsonMOON_HOME=/pinned/stable/home \
MORPHIR_REQUIRED_TARGETS=js,wasm-gc,native \
MORPHIR_INSTALLED_RECEIPTS=.dev/installed-receipts \
mise run test:installed-lifecycle[pipeline]
strict_naming = true[metadata]
provider = "shared-local-restore"
service = "/tools/morphir-provider-snapshot"
policy = "/trust/policy.json"
lock = "morphir.lock"
registry = "/registry/local"
state = "/trust/state"
assurance = "portable"
[metadata.naming]
release = "example.com/morphir/naming@1.0.0"{
profile: "morphir-metadata-host-grants-v1",
workspace: "/work/example",
runtime: {
node: "/tools/node", nodeSha256: "sha256:<raw digest>",
helper: "/tools/morphir/build-provider/metadata.mjs",
helperBundleSha256: "sha256:<bundle digest>"
},
projects: [{
project: "one",
service: "/tools/morphir-provider-snapshot",
serviceSha256: "sha256:<raw digest>",
policy: "/trust/policy.json", lock: "/work/example/one/morphir.lock",
registry: "/registry/local", state: "/trust/state"
}]
}morphir connected connect launch.txt --provider workbench-http \
--connection connection.json --json
morphir connected run request.json --provider workbench-http \
--connection connection.json --timeout 120000 --json