cli → zoo → kcl →
zoo kcl format
Format a kcl
file.
Options
input
- The path to the input kcl file to format. If you pass
-
as the path, the file will be read from stdin -w/--write
- Write the output back to the original file. This will fail if the input is from stdin
Default value:false
-t/--tab-size
- Size of a tab in spaces
Default value:2
--use-tabs
- Prefer tabs over spaces
Default value:false
--insert-final-newline
- 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
-f/--format
- Command output format
Possible values:json | yaml | table
-d/--debug
- Print debug info
Default value:false
-h/--help
- Print help (see a summary with '-h')
About
# 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