Caddy(8)

πŸ’– NAME πŸ’–

caddy-fmt β€” bestie, it formats your Caddyfile ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

caddy fmt [--overwrite] [--diff] [] [flags]

🌸 DESCRIPTION 🌸

Okay so caddy fmt takes your Caddyfile and gives it a whole glow-up: it adds proper indentation and spaces so actual humans can read it without squinting 😭. The result gets printed to stdout, that's the default vibe.

If you pass --overwrite, the output is written straight to the config file itself instead of being printed. No dying of suspense on stdout, it just goes in 🌈.

If you pass --diff, the output gets compared against the input, and lines get prefixed with - and + wherever they differ. Quick heads up though: unchanged lines get prefixed with two spaces for alignment, and this is not a valid patch format β€” so don't go feeding it to patch, ok? πŸ’€

And if you want stdin instead of a regular file (iconic move honestly), just use - as the path. But heads up: when you're reading from stdin, the --overwrite flag has no effect β€” the result is always printed to stdout. That's just the rules πŸŽ€.


πŸ’… OPTIONS πŸ’…

  • -c, --config="" β€” Configuration file
  • -d, --diff[=false] β€” Print the differences between the input file and the formatted output
  • -h, --help[=false] β€” help for fmt
  • -w, --overwrite[=false] β€” Overwrite the input file with the results

πŸ‘‘ SEE ALSO πŸ‘‘

caddy(8)


⭐ HISTORY ⭐

1-Jan-0001 Auto generated by spf13/cobra


🫢 and that's the whole page bestie, no cap. This was auto generated by spf13/cobra, dated Jan 0001, and it lives in the Caddy(8) manual β€” go format something pretty now πŸ’œβœ¨

πŸ“¦ where this page comes from