KosmoKrator

productivity

Caddy CLI for Shell Scripts

Use the Caddy CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 5 read 2 write Bearer token auth

Caddy CLI for Shell Scripts

Call integration functions from shell scripts with stable JSON input and output.

Use shell scripts for small local automations that need one or more integration calls. The Caddy CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Caddy CLI for Shell Scripts
kosmokrator integrations:configure caddy --set access_token="$CADDY_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call caddy.caddy_list_sites '{"page":1,"per_page":1}' --json

Discovery Before Execution

Agents and scripts can inspect Caddy docs and schemas before choosing a function.

kosmo integrations:docs caddy --json
kosmo integrations:docs caddy.caddy_list_sites --json
kosmo integrations:schema caddy.caddy_list_sites --json
kosmo integrations:search "Caddy" --json
kosmo integrations:list --json

Useful Caddy CLI Functions

FunctionTypeParametersDescription
caddy.caddy_list_sites Read page, per_page List all Caddy sites. Returns site IDs, domain names, status, and configuration details.
caddy.caddy_get_site Read site_id Get detailed information about a specific Caddy site, including its configuration, domain, and status.
caddy.caddy_create_site Write name, config Create a new site in Caddy. Specify the domain name and optional configuration parameters.
caddy.caddy_delete_site Write site_id Delete a site from Caddy. This action is irreversible and will remove the site and its configuration.
caddy.caddy_list_certificates Read page, per_page List all TLS certificates managed by Caddy. Returns certificate IDs, domains, expiry dates, and status.
caddy.caddy_get_certificate Read certificate_id Get detailed information about a specific TLS certificate, including domain, issuer, validity, and SANs.
caddy.caddy_get_current_user Read none Get details of the currently authenticated Caddy user. Returns user ID, email, username, and account info.

Automation Notes

Related Caddy CLI Pages