cli → zoo → kcl

zoo kcl format

Format a kcl file.


The path to the input kcl file to format. If you pass - as the path, the file will be read from stdin
Write the output back to the original file. This will fail if the input is from stdin
Default value: false
Size of a tab in spaces
Default value: 2
Prefer tabs over spaces
Default value: false
How to handle the final newline in the file. If true, ensure file ends with a newline. If false, ensure file does not end with a newline
Default value: true
Command output format
Possible values: json | yaml | table
Print debug info
Default value: false
Print help (see a summary with '-h')


# Output to stdout by default
$ zoo kcl fmt my-file.kcl

# Overwrite the file
$ zoo kcl fmt -w my-file.kcl

# Pass a file to format from stdin
$ cat my-obj.kcl | zoo kcl fmt

See also