CLI Usage
Usage: typstyle [OPTIONS] [INPUT]...Arguments: [INPUT]... List of files or directories to format [default: stdin]Options: -i, --inplace Format the file in place --check Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with a non-zero status code if formatting is required --diff Run in 'diff' mode. Shows unified diff of what formatting changes would be made. Exits with 0 if input is formatted correctly. Exits with a non-zero status code if formatting is required -h, --help Print help -V, --version Print versionFormat Configuration: -l, --line-width <LINE_WIDTH> Maximum width of each line [default: 80] [aliases: -c, --column] -t, --indent-width <INDENT_WIDTH> Number of spaces per indentation level [default: 2] [aliases: --tab-width] --no-reorder-import-items Disable alphabetical reordering of import items --wrap-text Wrap text in markup to fit within the line width, and collapse spaces in markupDebug Options: -a, --ast Print the AST of the input file -p, --pretty-doc Print the pretty document --timing Show elapsed time taken by the formatterLog Levels: -v, --verbose Enable verbose logging -q, --quiet Print diagnostics, but nothing else
Usage: typstyle [OPTIONS] [INPUT]...Arguments: [INPUT]... List of files or directories to format [default: stdin]Options: -i, --inplace Format the file in place --check Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with a non-zero status code if formatting is required --diff Run in 'diff' mode. Shows unified diff of what formatting changes would be made. Exits with 0 if input is formatted correctly. Exits with a non-zero status code if formatting is required -h, --help Print help -V, --version Print versionFormat Configuration: -l, --line-width <LINE_WIDTH> Maximum width of each line [default: 80] [aliases: -c, --column] -t, --indent-width <INDENT_WIDTH> Number of spaces per indentation level [default: 2] [aliases: --tab-width] --no-reorder-import-items Disable alphabetical reordering of import items --wrap-text Wrap text in markup to fit within the line width, and collapse spaces in markupDebug Options: -a, --ast Print the AST of the input file -p, --pretty-doc Print the pretty document --timing Show elapsed time taken by the formatterLog Levels: -v, --verbose Enable verbose logging -q, --quiet Print diagnostics, but nothing else
# Format multiple filestypstyle -i chapter1.typ chapter2.typ appendix.typ# Format entire projecttypstyle -i .# Format with specific configurationtypstyle -l 100 -t 4 --wrap-text -i src/
# Format multiple filestypstyle -i chapter1.typ chapter2.typ appendix.typ# Format entire projecttypstyle -i .# Format with specific configurationtypstyle -l 100 -t 4 --wrap-text -i src/
# Format from stdin (default)cat file.typ | typstyle# Format specific filestypstyle file1.typ file2.typ# Format directories (recursively)typstyle src/ docs/
# Format from stdin (default)cat file.typ | typstyle# Format specific filestypstyle file1.typ file2.typ# Format directories (recursively)typstyle src/ docs/
# Modify files directlytypstyle -i file.typtypstyle --inplace file.typ
# Modify files directlytypstyle -i file.typtypstyle --inplace file.typ
# Exit with non-zero if formatting neededtypstyle --check src/
# Exit with non-zero if formatting neededtypstyle --check src/
# Like --check, but shows unified diff of what formatting changes would be madetypstyle --diff src/
# Like --check, but shows unified diff of what formatting changes would be madetypstyle --diff src/
# Set maximum line width (default: 80)typstyle -l 100 file.typtypstyle --line-width 100 file.typ
# Set maximum line width (default: 80)typstyle -l 100 file.typtypstyle --line-width 100 file.typ
# Set indentation width (default: 2)typstyle -t 4 file.typtypstyle --indent-width 4 file.typ
# Set indentation width (default: 2)typstyle -t 4 file.typtypstyle --indent-width 4 file.typ
# Wrap text in markup to fit line widthtypstyle --wrap-text file.typ
# Wrap text in markup to fit line widthtypstyle --wrap-text file.typ
# Print the Abstract Syntax Treetypstyle -a file.typtypstyle --ast file.typ
# Print the Abstract Syntax Treetypstyle -a file.typtypstyle --ast file.typ
# Print the internal pretty document representationtypstyle -p file.typtypstyle --pretty-doc file.typ
# Print the internal pretty document representationtypstyle -p file.typtypstyle --pretty-doc file.typ
# Show elapsed time taken by the formattertypstyle --timing file.typ
# Show elapsed time taken by the formattertypstyle --timing file.typ
See CLI help.