Skip to main content

Migrating From Old CLI To New CLI

Overview​

This document contains cli commands that were migrated from the old cli, which is morphir-elm, into the new all cli commands supported by the old cli, and the current cli, morphir.

CommandFlagsDescriptionOld CLINew CLINew CommandComment
make✅✅morphir make
-p , --project-dir <path>Root directory of the project where morphir.json is located.
-o , --output <path>Target file location where the Morphir IR will be saved.
-t, --types-onlyOnly include type information in the IR, no values.
-f, --fallback-cliUse old cli make function.
test✅✘morphir test
-p, --project-dir <path>Root directory of the project where morphir.json is located.
stats✘✅morphir stats
-i, --input <path>Source location where the Morphir IR will be loaded from.
-o, --output <path>Target location where the generated code will be saved.
dockerize✘✅morphir dockerize
-p, --project-dir <path>Root directory of the project where morphir.json is located
-f, --forceOverwrite any Dockerfile in target location
gen✅✘
-i, --input <path>Source location where the Morphir IR will be loaded from.
-o, --output <path>Target location where the generated code will be saved.
-t, --target <type>Language to Generate (Scala | Cadl | JsonSchema | TypeScript).To generate Scala, use command morphir scala-gen
-e, --target-version <version>Language version to Generate.
-c, --copy-depsCopy the dependencies used by the generated code to the output path
-m, --modules-to-include <comma.separated>Limit the set of modules that will be included
-s, --include-codecsGenerate JSON codecs
-f, --filename <filename>Filename of the generated JSON Schema
-cc, --custom-config <filepath>A filepath to load additional configuration for the backend
scala-gen✘✅morphir scala gen
-i, --input <path>Source location where the Morphir IR will be loaded from
-o, --output <path>Target location where the generated code will be saved
-t, --target <type> Language to GenerateDeprecated
-e, --target-version <version>Language version to Generate
-c, --copy-depsCopy the dependencies used by the generated code to the output path
-s, --include-codecs <boolean>Generate the scala codecs as well
-m, --limitToModules <comma.separated>Limit the set of modules that will be included
json-schema-gen✘✅morphir jsonschema gen
-i, --input <path>Source location where the Morphir IR will be loaded from
-o, --output <path>Target location where the generated code will be saved
-t, --target <type> Language to GenerateDeprecated
-e, --target-version <version>Language version to Generate
-f, --filename <filename>Filename of the generated JSON Schema
-m, --limit-to-modules <comma.separated>Limit the set of modules that will be included
-g, --group-schema-by <string>Group generate schema by package, module or type
-c, --use-configUse configuration specified in the config file
-ls, --include <comma.separated,list.of,strings>Limit what will be included
develop✅✘morphir develop
-p, --port <port>Port to bind the web server to
-o, --host <host>Host to bind the web server to.