productivity
Caddy CLI for CI
Use the Caddy CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 5 read 2 write Bearer token auth
Caddy CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. 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 CI
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
| Function | Type | Parameters | Description |
|---|---|---|---|
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
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.