Skip to content

Command Line Usage


A. Command Line Usage

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

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

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

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

B. CLI Arguments

ArgumentDescriptionDefault
--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 for indentationfalse
--single-quoteUse single quotesfalse

C. References