.nh .TH "Caddy" "8" "Oct 2026" "Auto generated by spf13/cobra" "" .SH NAME caddy-fmt - Formats a Caddyfile .SH SYNOPSIS \fBcaddy fmt [--overwrite] [--diff] [] [flags]\fP .SH DESCRIPTION Formats the Caddyfile by adding proper indentation and spaces to improve human readability. It prints the result to stdout. .PP If --overwrite is specified, the output will be written to the config file directly instead of printing it. .PP If --diff is specified, the output will be compared against the input, and lines will be prefixed with '-' and '+' where they differ. Note that unchanged lines are prefixed with two spaces for alignment, and that this is not a valid patch format. .PP If you wish to use stdin instead of a regular file, use - as the path. When reading from stdin, the --overwrite flag has no effect: the result is always printed to stdout. .SH OPTIONS \fB-c\fP, \fB--config\fP="" Configuration file .PP \fB-d\fP, \fB--diff\fP[=false] Print the differences between the input file and the formatted output .PP \fB-h\fP, \fB--help\fP[=false] help for fmt .PP \fB-w\fP, \fB--overwrite\fP[=false] Overwrite the input file with the results .SH SEE ALSO \fBcaddy(8)\fP .SH HISTORY 29-Oct-2026 Auto generated by spf13/cobra