Fmt
Fmt
The fmt command formats a Trilogy script file - or every script in a directory
- with proper syntax and consistent styling.
Usage
trilogy fmt <input>
Arguments
| Argument | Description |
|---|---|
input | Path to a Trilogy script file or a directory of them. Must exist. |
Full Example
# Format a script file
trilogy fmt my_query.preql
# Format every script in a directory
trilogy fmt models/
# With debug output
trilogy --debug fmt my_query.preql
What It Does
- Parses the script and reformats it with consistent styling
- Overwrites the original file with the formatted version
- Displays formatting statistics including number of statements and duration
Notes
- The path must exist
- Files are overwritten in place
--debugis a global option, so it goes before the subcommand