This command runs the kcl code and displays the output. 'kcl run' takes multiple input for arguments.
For example, 'kcl run path/to/kcl.k' will run the file named path/to/kcl.k
Usage:
kcl run [flags]
Aliases:
run, r
Examples:
kcl run
kcl run path/to/kcl.k
kcl run path/to/kcl.k --format json
kcl run path/to/kcl.k --format toml
kcl run path/to/kcl.k --format xml
kcl run path/to/kcl1.k path/to/kcl2.k
kcl run oci://ghcr.io/kcl-lang/helloworld --tag 0.1.0
kcl run git://github.com/kcl-lang/flask-demo-kcl-manifests --commit ade147b
kcl run --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.0
kcl run --git https://github.com/kcl-lang/flask-demo-kcl-manifests --branch main
kcl run --git ssh://github.com/kcl-lang/flask-demo-kcl-manifests --branch main
kcl run subhelloworld --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.4
kcl run subhelloworld:0.0.1 --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.4
kcl run cc --git https://github.com/kcl-lang/flask-demo-kcl-manifests --commit 8308200
kcl run cc:0.0.1 --git https://github.com/kcl-lang/flask-demo-kcl-manifests --commit 8308200
Flags:
-D, --argument stringArray Specify the top-level argument
-b, --branch string Specify the branch for the Git artifact
-c, --commit string Specify the commit for the Git artifact
-d, --debug Run in debug mode
-n, --disable_none Disable dumping None values
-E, --external stringArray Specify the mapping of package name and path where the package is located
--format string Specify the output format (yaml, json, toml, xml). When xml is selected, schema attributes decorated with `@info(type="attr")` are rendered as `name="value"` attributes on the parent element instead of as child elements. (default "yaml")
--git string Specify the KCL module git url
-h, --help help for run
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
--oci string Specify the KCL module oci url
-o, --output string Specify the YAML/JSON output file path
-O, --overrides stringArray Specify the configuration override path and value
-S, --path_selector stringArray Specify the path selectors
-q, --quiet Set the quiet mode (no output)
-Y, --setting stringArray Specify the command line setting files
-H, --show_hidden Display hidden attributes
-k, --sort_keys Sort output result keys
-r, --strict_range_check Do perform strict numeric range checks
-t, --tag string Specify the tag for the OCI or Git artifact
-V, --vendor Run in vendor mode