caddy_adapt
Convert configs from any adapter format (Caddyfile, nginx, yaml) into Caddy JSON without loading. Preview generated config or migrate from other formats.
Instructions
Convert a config in any registered adapter format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces, or for porting from nginx/yaml configs when Caddy is built with the matching adapter module ('caddyfile' is built-in; 'nginx', 'yaml', etc. require their adapter modules to be compiled into the Caddy binary). Returns the adapted JSON and any warnings separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | The raw config text (e.g., Caddyfile contents, nginx.conf, yaml) | |
| adapter | No | Config format adapter. Must match an adapter Caddy was built with. Built-in: 'caddyfile' (default). Common external adapters: 'nginx' (caddy-nginx-adapter), 'yaml' (caddy-yaml). | caddyfile |