Skip to content

CDNFoundry CLI commands ​

Confirm the target environment

Before a production command, verify the exact release, Compose files, environment file, host role, and database endpoint. Never paste secrets into command arguments or run maintenance commands against an assumed context.

Run commands from the Laravel application directory, or through the repository's core Docker Compose service. List only CDNFoundry commands with:

sh
php artisan list cdnf
docker compose -f compose.dev.yml run --rm core php artisan list cdnf

View the authoritative arguments and options for any command with:

sh
php artisan help cdnf:<area>:<action>
docker compose -f compose.dev.yml run --rm core php artisan help cdnf:<area>:<action>

Commands that enqueue work return before asynchronous runtime changes finish. Run production examples with docker compose --env-file .env.prod -f compose.prod.yml exec core php artisan ... against an already-running core service.

Administration ​

Command and syntaxPurpose and effectsScheduled
cdnf:admin:create {--name=} {--email=}Prompts for a password and creates an administrator plus an audit event. Fails on invalid or duplicate input; avoid supplying passwords in shell arguments or history.No
sh
docker compose -f compose.dev.yml run --rm core php artisan cdnf:admin:create --name="Operations Admin" --email="admin@example.test"

API ​

Command and syntaxPurpose and effectsScheduled
cdnf:api:openapi {--check}Generates the route-derived OpenAPI contract and endpoint catalog. --check makes no changes and fails when committed artifacts are stale; without it, the command rewrites generated documentation.No
sh
docker compose -f compose.dev.yml run --rm core php artisan cdnf:api:openapi --check

Audit ​

Command and syntaxPurpose and effectsScheduled
cdnf:audit:prune {--batch=1000}Permanently deletes one bounded batch of audit events beyond configured retention. Increase the batch cautiously because deletion load grows with it.Daily at 03:10

Backups ​

Command and syntaxPurpose and effectsScheduled
cdnf:backups:create {--wait}Creates backup and operation records, then queues an encrypted PostgreSQL Restic backup. --wait executes the job in the foreground and waits for repository acknowledgement. Fails if the repository is not configured.Daily at 01:30 when configured
cdnf:backups:restore {operation}Restores the backup approved by a successful restore-preflight operation. This is destructive, requires the explicit restore maintenance boundary, runs migrations, queues reconciliation, and leaves maintenance mode active if recovery fails.No
sh
docker compose --env-file .env.prod -f compose.prod.yml exec core php artisan cdnf:backups:create --wait
docker compose --env-file .env.prod -f compose.prod.yml exec core php artisan cdnf:backups:restore 6f9619ff-8b86-d011-b42d-00c04fc964ff

DNS and domains ​

Command and syntaxPurpose and effectsScheduled
cdnf:dns:deprovision-dueDispatches at most 1,000 due DNS-zone deprovision jobs in chunks of 100. It does not wait for PowerDNS changes.Every minute
cdnf:domains:expire-claimsRetires at most 500 unverified claims older than seven days; runtime deletion remains asynchronous.Every minute
cdnf:domains:finalize-deprovisioning {--limit=100}Dispatches finalization for due retired domains after runtime tombstones are safe. The effective limit is clamped to 1–1,000.Every minute

Edge ​

Command and syntaxPurpose and effectsScheduled
cdnf:edge:complete-placement-drains {--limit=100}Promotes ready target pools after DNS drain, advances desired revisions, records audit events, and queues edge reconciliation. Limit is clamped to 1–1,000.Every minute
cdnf:edge:dispatch-origin-checks {--limit=100}Dispatches a jittered, bounded batch of explicitly enabled origin checks. Limit is clamped to 1–500 and at most five checks are selected per domain.Every minute
cdnf:edge:prune-revisions {--limit=1000}Permanently removes expired derived edge revisions and artifacts while retaining active and rollback-protected state. Limit is clamped to 1–10,000.Daily at 02:30
cdnf:edge:reconcile-stale-placements {--limit=100}Requeues interrupted stale placement deployments so they converge. Limit is clamped to 1–1,000.Every minute
sh
docker compose -f compose.dev.yml run --rm core php artisan cdnf:edge:reconcile-stale-placements --limit=50

Service health ​

Command and syntaxPurpose and effectsScheduled
cdnf:health:publishSamples existing system and queue checks once, then caches only public component names and states for the status page. It performs no runtime mutation.Every minute

Platform settings ​

Command and syntaxPurpose and effectsScheduled
cdnf:platform:settings:show {group?} {--json}Reads PostgreSQL-backed settings, descriptions, defaults, and active values. Supply an optional group; --json emits machine-readable output.No
cdnf:platform:settings:set {group} {values}Validates a JSON object, updates one setting group and revision, and queues runtime reconciliation when required. Quote JSON to prevent shell expansion.No
sh
docker compose -f compose.dev.yml run --rm core php artisan cdnf:platform:settings:show dns_lifecycle --json
docker compose -f compose.dev.yml run --rm core php artisan cdnf:platform:settings:set dns_lifecycle '{"deprovision_delay_days":14}'

Security and WAF ​

Command and syntaxPurpose and effectsScheduled
cdnf:security:reconcile-readiness {--limit=100}Expires emergency controls and advances quiet domains through bounded security recovery, producing reconciliation work. Limit is clamped to 1–1,000.Every minute
cdnf:waf:expire-exclusions {--limit=100}Permanently removes due managed-WAF exclusions in bounded domain batches, increments revisions, records audit events, and queues signed edge artifacts. Limit is clamped to 1–1,000.Every minute

TLS ​

Command and syntaxPurpose and effectsScheduled
cdnf:tls:dispatch-maintenance {--limit=500}Cleans expired ACME challenges, advances a shared bounded domain sweep for managed-certificate maintenance, and publishes administrator expiry/failure alerts. Limit is clamped to 1–2,000; scan progress advances only after dispatch and resets after each fixed domain-ID range.Hourly

Usage ​

Command and syntaxPurpose and effectsScheduled
cdnf:usage:finalizeDispatches an idempotent rebuild for the most recently finalized UTC usage hour. It does not wait for ClickHouse aggregation.Hourly at minute 20

Scheduler ​

All command schedules use overlap prevention. The scheduler also runs framework or internal non-command work, which is intentionally not renamed here.

Scheduled commandFrequencyPurpose
cdnf:dns:deprovision-dueEvery minuteQueue due DNS removals
cdnf:domains:expire-claimsEvery minuteDeprovision at most 500 expired unverified claims; preserve verified ownership.
cdnf:domains:finalize-deprovisioningEvery minuteFinalize safe domain retirement
cdnf:edge:complete-placement-drainsEvery minuteComplete ready placement drains
cdnf:edge:reconcile-stale-placementsEvery minuteRetry stale placements
cdnf:edge:dispatch-origin-checksEvery minuteQueue due opt-in origin checks
cdnf:edge:prune-revisionsDaily at 02:30Remove expired derived revision history
cdnf:health:publishEvery minuteRefresh the sanitized public status page snapshot
cdnf:tls:dispatch-maintenanceHourlyMaintain managed certificates and alerts
cdnf:security:reconcile-readinessEvery minuteAdvance bounded security recovery
cdnf:waf:expire-exclusionsEvery minuteRemove due WAF exclusions
cdnf:usage:finalizeHourly at minute 20Queue the finalized usage hour
cdnf:audit:pruneDaily at 03:10Delete one expired audit batch
cdnf:backups:createDaily at 01:30 when configuredQueue the control-plane backup

Laravel's horizon:snapshot runs every five minutes and model:prune runs hourly. They remain unchanged because they are not CDNFoundry-owned commands.

CDNFoundry documentation