Skip to content

Artisan commands

Artisan commands

Each command is a thin adapter: it resolves the container-bound Cbox\Dns\Dns and renders the result. Exit codes are CI-friendly.

dns:lookup

php artisan dns:lookup {host} {type=A}

Renders a table of the records (name, type, TTL, priority, value). An unknown record type exits non-zero; a name with no records of the type exits 0 with a notice.

dns:verify

php artisan dns:verify {domain} {token}

Prints the challenge host and whether the token verifies authoritatively. Exits 0 when verified, 1 otherwise.

dns:diagnose

php artisan dns:diagnose {domain}

Runs the diagnostics catalog and prints findings grouped by category with a colored severity badge (ERROR / WARNING / INFO). Exits 1 when the report has errors, 0 otherwise.

dns:propagation

php artisan dns:propagation {host} {type} {zone} {--all}

Compares the authoritative record set against the public-resolver panel and prints a per-resolver table (agree / pending) plus the overall status. --all queries the full named provider registry. Exits 1 when the record is MISCONFIGURED (no authoritative answer), 0 otherwise.

dns:dnssec

php artisan dns:dnssec {domain}

Validates the DNSSEC chain from the root down and prints the state (SECURE / INSECURE / BOGUS) with the reason. Only BOGUS exits 1 — INSECURE is a legitimate, authenticated "this zone is unsigned".

dns:domain-connect:discover

php artisan dns:domain-connect:discover {name} {--template=}

Discovers whether the domain's DNS provider speaks Domain Connect. Prints the zone, host, provider name, sync URL, API URL, and Supported (yes / no / unknown). --template is a path to a template JSON; with it, template support is checked. Exits 0 when the synchronous flow is available, 1 when it is not, the template file cannot be read, or discovery fails.

dns:domain-connect:keys

php artisan dns:domain-connect:keys {--verify} {--domain=}

Prints the public-key TXT record values for the configured DNS_DOMAIN_CONNECT_PRIVATE_KEY, one per line. With --verify and --domain (the syncPubKeyDomain), reads the live TXT at <key_host>.<domain> and prints the key host, the number of live records, and MATCH or MISMATCH. Exits 0 on print or MATCH; 1 when no key is configured or readable, when --verify has no --domain, or on MISMATCH.

dns:domain-connect:url

php artisan dns:domain-connect:url {template} {name} {--var=*} {--group=*} {--redirect=} {--state=}

Discovers name, then prints a signed synchronous apply URL for the template file. --var takes name=value and --group a template group id; both repeat. Exits 0 with the URL, 1 on a malformed --var, an unreadable template, a DNS provider without the synchronous flow, or a refusal to sign (no key, or a provider id that is unset or differs from the template's).