Skip to content

Command Line Usage ​


A. Command Line Usage ​

bash
# Format file (output to stdout)
yaoxiang format file.yx

# Check if file is formatted
yaoxiang format --dry-run file.yx

# Format and write to file
yaoxiang format -w file.yx

# Format all .yx files in a directory
yaoxiang format -w src/

B. CLI Parameters ​

ParameterDescriptionDefault
--dry-runCheck mode, do not modify filesfalse
-w, --writeWrite mode, modify filesfalse
--stdoutOutput to stdoutfalse
--indent-widthIndent width4
--line-widthMaximum line width120
--use-tabsUse tab indentationfalse
--single-quoteUse single quotesfalse

C. References ​