.nh .TH "Caddy" "8" "Oct 2026" "Auto generated by spf13/cobra" "" .SH NAME caddy-adapt - Adapts a configuration to Caddy's native JSON .SH SYNOPSIS \fBcaddy adapt --config [--adapter ] [--pretty] [--validate] [--envfile ] [flags]\fP .SH DESCRIPTION Adapts a configuration to Caddy's native JSON format and writes the output to stdout, along with any warnings to stderr. .PP If --pretty is specified, the output will be formatted with indentation for human readability. .PP If --validate is used, the adapted config will be checked for validity. If the config is invalid, an error will be printed to stderr and a non- zero exit status will be returned. .PP If --envfile is specified, an environment file with environment variables in the KEY=VALUE format will be loaded into the Caddy process. .PP If you wish to use stdin instead of a regular file, use - as the path. .SH OPTIONS \fB-a\fP, \fB--adapter\fP="caddyfile" Name of config adapter .PP \fB-c\fP, \fB--config\fP="" Configuration file to adapt (required) .PP \fB--envfile\fP=[] Environment file(s) to load .PP \fB-h\fP, \fB--help\fP[=false] help for adapt .PP \fB-p\fP, \fB--pretty\fP[=false] Format the output for human readability .PP \fB--validate\fP[=false] Validate the output .SH SEE ALSO \fBcaddy(8)\fP .SH HISTORY 13-Oct-2026 Auto generated by spf13/cobra