version: "1.0.1" name: format description: Format SQL files using the syntaqlite formatter. Use when the user wants to format, reformat, or pretty-print SQL code.
Format SQLite SQL using the syntaqlite CLI formatter.
bash
# Format a file (print to stdout)
syntaqlite fmt query.sql
# Format in-place
syntaqlite fmt -i query.sql
# Format from stdin
echo "SELECT a,b FROM t WHERE x=1" | syntaqlite fmt
# Format multiple files via glob
syntaqlite fmt -i "**/*.sql"
# Format with options
syntaqlite fmt -w 120 -k upper query.sql