Common Flags
Summary#
This page lists all common optional flags which can be used in Sysl commands.
Common Optional Flags#
--helpShow context-sensitive help (also try --help-long).--versionShow application version.--log="warn"Log level: [off,debug,info,warn,trace].-v, --verboseEnable verbose logging.--root=ROOTSysl root directory for input model file. If root is not found, the module directory becomes the root, but the module can not import with absolute paths (or imports must be relative).
Standard Input#
In some contexts, Sysl source is not available to be read from disk and must be passed to Sysl via stdin. This can be done like so:
echo '[{"path": "path/to/foo.sysl", "content": "$(cat path/to/foo.sysl)"}]' | sysl cmd`The format of the stdin data is JSON-encoded array of files, where each file has path and content properties.
contentis the source to parsepathis where the source should be assumed to live (whether or not is actually on disk). The parser will use this when resolving relative imports in the source.
Note that modules cannot be provided via both stdin and the MODULES arg. If both are present, MODULES will take precedence and stdin will be ignored.
Examples#
sysl --helpsysl --versionsysl import -v --input=simple-api.yaml --app-name=Simple --output=simple-api.syslsysl import --log="info" --input=simple-api.yaml --app-name=Simple --output=simple-api.syslsysl export --format="openapi3" --output="%(appname).yaml" --root=./demos simple-openapi3.sysl